Normalize named entities to numeric
authorAryeh Gregor <simetrical@users.mediawiki.org>
Fri, 11 Mar 2011 20:50:17 +0000 (20:50 +0000)
committerAryeh Gregor <simetrical@users.mediawiki.org>
Fri, 11 Mar 2011 20:50:17 +0000 (20:50 +0000)
commitec4a1898916b9caaad230da8518e3fd65bd169a8
tree16e27ad76046d70e5be7d05b40e40779437c17ef
parent77b2dc77c908c5b85f5c104548dc8047972b22e7
Normalize named entities to numeric

We should never be outputting named entities other than the ones in XML,
&lt; &gt; &amp; &quot;, because that will break well-formedness unless
we have a DTD in the doctype, which we don't in HTML5 mode.

I stuck with outputting numeric entities here instead of UTF-8 because
some characters are hard to read in UTF-8 (e.g., &nbsp;).  Maybe it
would be nicer if we decoded to UTF-8 except for whitespace and control
characters, or something like that, but it's a detail.

I'll backport to 1.17 and add RELEASE-NOTES there, which is why I added
the line to HISTORY instead of RELEASE-NOTES.
HISTORY
includes/Sanitizer.php
tests/parser/parserTests.txt