[mkgmap-dev] Splitter: Possible bug: not escaping '>' with '> 'From Ivan Kostoski ivan.kostoski at gmail.com on Thu Oct 22 13:07:34 BST 2009
On Thu, Oct 22, 2009 at 1:16 PM, Steve Ratcliffe <steve at parabola.me.uk>wrote: > On 22/10/09 10:27, Chris Miller wrote: > > Yep that sounds like a bug all right. I haven't looked at the code yet > but > > it's interesting that< is OK but> isn't... Thanks for the report, > > I've put it on my todo list. > > No, the '>' is a valid character inside the attribute value. Only '&', > '<' and the enclosing quote character need to be escaped. > Please allow me to disagree, at least on definition... Quote from http://www.w3.org/TR/REC-xml/ --- The ampersand character (&) and the left angle bracket (<) *MUST NOT* appear in their literal form, except when used as markup delimiters, or within a comment <http://www.w3.org/TR/REC-xml/#dt-comment>, a processing instruction<http://www.w3.org/TR/REC-xml/#dt-pi>, or a CDATA section <http://www.w3.org/TR/REC-xml/#dt-cdsection>. If they are needed elsewhere, they *MUST* be escaped<http://www.w3.org/TR/REC-xml/#dt-escape>using either numeric character references <http://www.w3.org/TR/REC-xml/#dt-charref> or the strings " & " and " < " respectively. The right angle bracket (>)* *may be represented using the string " > ", and *MUST*, for compatibility<http://www.w3.org/TR/REC-xml/#dt-compat>, be escaped using either " > " or a character reference when it appears in the string " ]]> " in content, when that string is not marking the end of a CDATA section <http://www.w3.org/TR/REC-xml/#dt-cdsection>. --- So in any XML document (i.e. OSM data), it MUST be escaped to be valid XML. As I mentioned, it does not break mkgmap so it is not a big issue... In the meantime, I have worked around it by better tracking quotes. I just reported what I think it is a possible bug... Thank you, Ivan > It would break mkgmap if it was invalid. > > > IK> <tag k='name' v='Zakynthos<> Kyllini'/> > > ..Steve > > _______________________________________________ > mkgmap-dev mailing list > mkgmap-dev at lists.mkgmap.org.uk > http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20091022/9b23ed5e/attachment.html
- Previous message: [mkgmap-dev] Splitter: Possible bug: not escaping '>' with '> '
- Next message: [mkgmap-dev] Splitter: Possible bug: not escaping '>' with '> '
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the mkgmap-dev mailing list