Comment 2 for bug 191199

Revision history for this message
In , Xyzzy-dataphile (xyzzy-dataphile) wrote :

Even for cases that have been anticipated, it looks like something weird is
going on here. Go to http://bugzilla.mozilla.org/xml.cgi?id=1000 and browse the
output and notice the invalid entities being generated for known cases.

QuoteXMLChars() in Bug.pm is supposed to be taking care of &, <, >, ', and ",
but the output above is somehow translating & into &amp;amp;, < into &amp;lt;,
and so on.

It looks as though translation is somehow happening twice, once expanding < to
&lt; for example, then expanding that to &amp;lt; . But QuoteXMLChars() doesn't
seem to be getting called twice within the <text /> tags output, and it
translates & characters before <, not after, as my guess would indicate. If it
is because of a recursive substitution, why does it stop? I am completely
baffled. Perhaps it is an escaping problem in QuoteXMLChars()?

Templates might be able to fix this, but without knowing what the problem is or
what the html filter covers, I can't be certain. IIRC, the html filter didn't
cover &quot;, much less umlauts, and I didn't see an xml filter.