[Mapserver-dev] Re: [Mapserver-users] WMS Cllient for ArcView 3.X

Daniel Morissette morissette at dmsolutions.ca
Wed Oct 8 15:37:49 EDT 2003


Paul Ramsey wrote:
> I believe Shane here has already reported a variant of this. In general, 
> a simple fix is, before being stuffed into an XML message, all error 
> text should be scanned for <, >, and & and the corresponding &entity; 
> should be inserted.
> 

Is this really the right thing to do?  From the pure XML validation 
perspective it is, but some clients may be confused to find HTML tags in 
the error messages anyway, so perhaps taking out the <br> is a better 
solution.

I think Assefa already took the <br> tag out of the exception output. 
Can you please confirm that Assefa?

If it's not been taken out yeet then please file this in bugzilla.

> Running
>   grep "<br>" *.c
> on the code turns up a very large quantity of error messages with 
> embedded <br>'s in them, which will of course throw an XML parser for a 
> loop if stuck literally into an XML error message.
> 

Funny they all come from 2 source files only: mappostgis.c and 
mapmygis.c.  ;)

My opinion is that such looooong error messages shouldn't be there. 
They should be replaced by a short error messages with a pointer to a 
URL where the errors are explained.

> Shall I ask Shane to do this fix, or would it be better if you did it as 
> the OpenGIS experts? I do not want to accidentaly screw anything up.
> The other question is: is it better to just entity'ize the stupid HTML 
> tags, or should we try and strip them, or try and replace them with 
> something "better" (like what, I dunno).
> 

I would tend to go with shorter error messages that don't require the 
<br> tags at all.

-- 
------------------------------------------------------------
  Daniel Morissette               morissette at dmsolutions.ca
  DM Solutions Group              http://www.dmsolutions.ca/
------------------------------------------------------------




More information about the mapserver-dev mailing list