[GeoNetwork-devel] Jeeves fix

hello list,

a few weeks ago I submitted a ticket for handling characters that are illegal in HTML and cause XSLT transformations to choke if the output format is HTML.

In a particular case, after migrating data from MySQL to Postgres, I could not use the editor anymore, with the error message

SERE0014 illegal HTML character: decimal 157

Now this does not tell you where you might start to look for it; it’s not even clear if it comes from DB content or maybe it’s in one of our zillion XSLT files, or what.

I propose a small fix to Jeeves such that it checks for illegal HTML characters every time a select is done from the DB. When this happens we can throw an exception stating which table is concerned and mention some context, e.g. the 50 characters preceding it, so it is more easy to find the problem.

The ticket is here : http://trac.osgeo.org/geonetwork/ticket/146.

Questions :

(1) do you agree to this solution ?
(2) as far as I know, illegal characters in HTML are the range 128 through 159 inclusive. Is that correct or are there more ?

Kind regards
Heikki Doeleman

Hi Heikki,
Could the illegal character at that point just be filtered out of the content, with a warning message added to the HTML and a log message put in the logs? Or some other solution where it is obvious thee was a problem, but the general user will not be bothered with exceptions while the content manager can take action?
Ciao,
Jeroen

On Sep 21, 2009, at 7:39 PM, heikki wrote:

hello list,

a few weeks ago I submitted a ticket for handling characters that are illegal in HTML and cause XSLT transformations to choke if the output format is HTML.

In a particular case, after migrating data from MySQL to Postgres, I could not use the editor anymore, with the error message

SERE0014 illegal HTML character: decimal 157

Now this does not tell you where you might start to look for it; it’s not even clear if it comes from DB content or maybe it’s in one of our zillion XSLT files, or what.

I propose a small fix to Jeeves such that it checks for illegal HTML characters every time a select is done from the DB. When this happens we can throw an exception stating which table is concerned and mention some context, e.g. the 50 characters preceding it, so it is more easy to find the problem.

The ticket is here : http://trac.osgeo.org/geonetwork/ticket/146.

Questions :

(1) do you agree to this solution ?
(2) as far as I know, illegal characters in HTML are the range 128 through 159 inclusive. Is that correct or are there more ?

Kind regards
Heikki Doeleman


Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf_______________________________________________
GeoNetwork-devel mailing list
GeoNetwork-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-devel
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork

It could of course be filtered out and logged, but at the level of Jeeves DBMS select it’s not so obvious how to add a warning message to the HTML.

For the general user the effect would be the same as now, i.e. you get an incomprehensible error message :slight_smile:

Anyone has an idea how to go about that adding warning messages to HTML when you detect something in a Jeeves select ?

On Tue, Sep 22, 2009 at 10:08 AM, Jeroen Ticheler <Jeroen.Ticheler@anonymised.com> wrote:

Hi Heikki,
Could the illegal character at that point just be filtered out of the content, with a warning message added to the HTML and a log message put in the logs? Or some other solution where it is obvious thee was a problem, but the general user will not be bothered with exceptions while the content manager can take action?
Ciao,
Jeroen

On Sep 21, 2009, at 7:39 PM, heikki wrote:

hello list,

a few weeks ago I submitted a ticket for handling characters that are illegal in HTML and cause XSLT transformations to choke if the output format is HTML.

In a particular case, after migrating data from MySQL to Postgres, I could not use the editor anymore, with the error message

SERE0014 illegal HTML character: decimal 157

Now this does not tell you where you might start to look for it; it’s not even clear if it comes from DB content or maybe it’s in one of our zillion XSLT files, or what.

I propose a small fix to Jeeves such that it checks for illegal HTML characters every time a select is done from the DB. When this happens we can throw an exception stating which table is concerned and mention some context, e.g. the 50 characters preceding it, so it is more easy to find the problem.

The ticket is here : http://trac.osgeo.org/geonetwork/ticket/146.

Questions :

(1) do you agree to this solution ?
(2) as far as I know, illegal characters in HTML are the range 128 through 159 inclusive. Is that correct or are there more ?

Kind regards
Heikki Doeleman


Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf_______________________________________________
GeoNetwork-devel mailing list
GeoNetwork-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-devel
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork