I found another problem caused by the QuoteXMLChars function in Bug.pm regarding
the '&' -> '&' conversion.
If I have for example a sequence like '->' in a bug description it is converted
to '->' when exporting this bug with xml.cgi.
Seems to be caused by QuoteXMLChars to be applied more than once on the same
field, thus first converting '>' to '>' and then '>' to '>'.
The solution is an additional look-ahead in QuoteXMLChars:
$_[0] =~ s/&/&/g;
should be replaced with
$_[0] =~ s/&(?![#A-Za-z][0-9A-Za-z]+;)/&/g;
This way, a '&' is not touched if it is used as a character prefix (as in >
or Ä or ™).
I found another problem caused by the QuoteXMLChars function in Bug.pm regarding
the '&' -> '&' conversion.
If I have for example a sequence like '->' in a bug description it is converted
to '->' when exporting this bug with xml.cgi.
Seems to be caused by QuoteXMLChars to be applied more than once on the same
field, thus first converting '>' to '>' and then '>' to '>'.
The solution is an additional look-ahead in QuoteXMLChars: #A-Za-z] [0-9A-Za- z]+;)/& amp;/g;
$_[0] =~ s/&/&/g;
should be replaced with
$_[0] =~ s/&(?![
This way, a '&' is not touched if it is used as a character prefix (as in >
or Ä or ™).