Last modified: 2005-11-15 11:19:16 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T3938, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 1938 - Unicode Byte Order Mark appearing in wikitext causes page to be cutoff
Unicode Byte Order Mark appearing in wikitext causes page to be cutoff
Status: RESOLVED FIXED
Product: Wikimedia
Classification: Unclassified
General/Unknown (Other open bugs)
unspecified
PC Windows 2000
: Normal critical with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
: parser
Depends on:
Blocks: unicode
  Show dependency treegraph
 
Reported: 2005-04-21 10:56 UTC by Alphax
Modified: 2005-11-15 11:19 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Alphax 2005-04-21 10:56:24 UTC
As noted on
(http://en.wikipedia.org/wiki/Wikipedia:Village_pump_%28technical%29),
occcurences of the Unicode Byte Order Mark (0xFEFF) cause pages to be cutoff.
This has occurred on [[User_talk:Alphax]]
(http://en.wikipedia.org/w/index.php?title=User_talk%3AAlphax&diff=0&oldid=12566960),
[[User_talk:Larry_Sanger]]
(http://en.wikipedia.org/w/index.php?title=User_talk%3ALarry_Sanger&diff=12607963&oldid=12594206)
and [[User_talk:Duncharris]
(http://en.wikipedia.org/w/index.php?title=User_talk%3ADuncharris&diff=12588770&oldid=12567290).

What is the cause of these, how can they be found, and when will it be fixed?
Comment 1 Brion Vibber 2005-04-21 11:01:00 UTC
Seems to be a problem with tidy. Investigating...
Comment 2 Brion Vibber 2005-04-21 11:12:36 UTC
The problem seems to triggered by illegal entity references such as &#0xfeff;

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.

Comment 3 Brion Vibber 2005-04-21 11:52:51 UTC
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.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links