Tag
Hash :
a0cd075d
Author :
Date :
2012-05-11T19:31:12
HTML parser error with <noscript> in the <head> For https://bugzilla.gnome.org/show_bug.cgi?id=615785 When the <noscript> is found, <head> is closed and a <body> element is created. The real <body id="xxx"> gets skipped over, so I can't see any of the body's attributes. Just don't close <head> when encountering a <noscript> Add a regression test too
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
SAX.setDocumentLocator()
SAX.startDocument()
SAX.internalSubset(html, , )
SAX.startElement(html)
SAX.ignorableWhitespace(
, 5)
SAX.startElement(head)
SAX.ignorableWhitespace(
, 9)
SAX.startElement(title)
SAX.characters(omg, 3)
SAX.endElement(title)
SAX.ignorableWhitespace(
, 9)
SAX.startElement(noscript)
SAX.startElement(link, rel='stylesheet', href='http://foo.com')
SAX.endElement(link)
SAX.endElement(noscript)
SAX.ignorableWhitespace(
, 5)
SAX.endElement(head)
SAX.ignorableWhitespace(
, 5)
SAX.startElement(body, id='xxx')
SAX.characters(
, 9)
SAX.startElement(p)
SAX.characters(yo, 2)
SAX.endElement(p)
SAX.characters(
, 5)
SAX.endElement(body)
SAX.ignorableWhitespace(
, 1)
SAX.endElement(html)
SAX.ignorableWhitespace(
, 1)
SAX.endDocument()