Bug 47082
Summary: | Certain strings text nodes may be incorrectly parsed as a HTML entity | ||
---|---|---|---|
Product: | WebKit | Reporter: | Andy E <andyearnshaw> |
Component: | DOM | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED WORKSFORME | ||
Severity: | Normal | CC: | abarth, ap |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | PC | ||
OS: | All | ||
URL: | http://jsfiddle.net/RHkyt/ |
Andy E
I haven't managed to figure out the special circumstances in which this occurs, but I can reproduce it consistently in WebKit nightly, Safari 5 and Chrome 6. A string consisting of an ampersand followed by an HTML entity name, BUT excluding the semi-colon suffix may be incorrectly rendered as the named entity. At the time, I assumed this to be a bug in a Markdown editor and posted the following bug report:
http://meta.stackoverflow.com/questions/66554/html-entities-bug-with-pre-tags-in-markdown-and-webkit
This bug report provides further demonstration of the bug. The simplest form of reproduction is the following HTML:
<html>
<head></head>
<body>&empty</body>
</html>
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Alexey Proskuryakov
Both these examples render in accordance with html5lib in WebKit nightlies for me. Andy, could you please double-check?
Note that "correctness" is a somewhat unclear concept here - implicitly closing named entities worked in both WebKit and Mozilla browsers, and it was correct according to SGML and HTML4. It's HTML5 draft spec that suddenly changed the rules.