This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Created attachment 566 [details] HTML 4.01 Strict compliant file Basically, the parser (0.8.3 I think) is interpreting text inside of a Javascript string as tags. This is best highlighted by the two attachments I'll add. The first attachment is HTML 4.01 Strict compliant. The second attachment is a unified diff that will break the parser. The parser will assume that strings in line 9 and 10 begin elements, but this is incorrect.
Created attachment 567 [details] patch against previous attachment to highlight parser bug $ patch -o html_borked.html < html_diff.diff Basically, the parser will think that lines 9 and 10 begin a '<script>' tag, and also end a '</scr>' tag.
(In reply to comment #0) > Basically, the parser (0.8.3 I think) is interpreting text inside of a > Javascript string as tags. Which it should, per the specification. See e.g: http://htmlhelp.com/tools/validator/problems.html#script
Doh! And there's even a link to an FAQ about scripts sections in the output. Thanks.
Created attachment 575 [details] Example HTML
Yes, however, it should not be semantically parsing HTML content in script tags. In other words, as long as the content of the script tag is valid XML, should it not be valid? For instance, in my attachment I receive two errors. The first states I have an invalid value for my 'id' attribute. And the second that the element 'li' does not belong there.
(In reply to comment #5) > Yes, however, it should not be semantically parsing HTML content in script > tags. Like it or not, that is what the specifications for (X)HTML say. e.g. http://www.w3.org/TR/html4/appendix/notes.html#h-B.3.2.1
Created attachment 576 [details] XHTML with no ETAGO in script
I've added an attachment that has html content nested inside the script tag. Per the spec at http://www.w3.org/TR/html4/appendix/notes.html#h-B.3.2.1 there is no ETAGO ("</...") which terminates the script tag. Still I am getting two validation errors which are incorrect per the spec.
(In reply to comment #8) > I've added an attachment that has html content nested inside the script tag. > Per the spec at http://www.w3.org/TR/html4/appendix/notes.html#h-B.3.2.1 there > is no ETAGO ("</...") which terminates the script tag. Still I am getting two > validation errors which are incorrect per the spec. I'm afraid not. Your example has markup (inside a <script>, but the point is, it does NOT matter to an HTML parser) including an id starting with a $ sign. That's not valid.