[Mapserver-dev] XML Entities

Paul Ramsey pramsey at refractions.net
Wed Oct 8 15:16:10 EDT 2003


Er, expansion, the following substitutions should be done:

<   &lt;
 >   &gt;
"   &quot;
&   &amp;
'   &apos;


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.
> 
> 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.
> 
> 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).


-- 
       __
      /
      | Paul Ramsey
      | Refractions Research
      | Email: pramsey at refractions.net
      | Phone: (250) 885-0632
      \_




More information about the mapserver-dev mailing list