Last modified: 2005-11-15 11:19:16 UTC
As noted on
occcurences of the Unicode Byte Order Mark (0xFEFF) cause pages to be cutoff.
This has occurred on [[User_talk:Alphax]]
What is the cause of these, how can they be found, and when will it be fixed?
Seems to be a problem with tidy. Investigating...
The problem seems to triggered by illegal entity references such as �xfeff;
This is not valid HTML/XML; the allowed numeric character references are decimal &#[0-9]+; and hexademical
&#[Xx][0-9A-Fa-f]+;. Putting a 0 _before_ the x is nicely invalid. Tidy looks at this and assumes you had meant
to type �xfeef;... and turns the � reference into a _literal_ null character in output.
A null character is actually ok in a PHP string, but the internal library interface to tidy seems to be treating tidy's
output as a null-terminated string when copying it back to PHP and output ends at that point.
Sigh... Ideally, I can tell tidy not to do this kind of 'correction', which is one that makes more trouble than help.
Our preexisting escaping would have fixed this in body text but was applied too early, so was not correcting the
link text. I've moved the escaping down to after link replacement and it's working now.
Fixed in CVS HEAD and REL1_4 and live on site. Will be included in 1.4.3 release.
Use action=purge if necessary on affected pages with cached broken rendering.