mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-07-29 11:41:22 +03:00
Fix regression parsing public IDs literals in HTML
Fix regression introduced when reworking htmlParsePubidLiteral in
commit 93ce33c2
.
Fixes #318.
This commit is contained in:
@ -3045,7 +3045,7 @@ htmlParsePubidLiteral(htmlParserCtxtPtr ctxt) {
|
|||||||
NEXT;
|
NEXT;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CUR != '"') {
|
if (CUR != quote) {
|
||||||
htmlParseErr(ctxt, XML_ERR_LITERAL_NOT_FINISHED,
|
htmlParseErr(ctxt, XML_ERR_LITERAL_NOT_FINISHED,
|
||||||
"Unfinished PubidLiteral\n", NULL, NULL);
|
"Unfinished PubidLiteral\n", NULL, NULL);
|
||||||
} else {
|
} else {
|
||||||
|
6
result/HTML/issue318.html
Normal file
6
result/HTML/issue318.html
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
|
||||||
|
<html>
|
||||||
|
<head><meta http-equiv='\"content-type\"' content='\"text/html;charset=utf-8\"'></head>
|
||||||
|
<body>
|
||||||
|
</body>
|
||||||
|
</html>
|
0
result/HTML/issue318.html.err
Normal file
0
result/HTML/issue318.html.err
Normal file
22
result/HTML/issue318.html.sax
Normal file
22
result/HTML/issue318.html.sax
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
SAX.setDocumentLocator()
|
||||||
|
SAX.startDocument()
|
||||||
|
SAX.internalSubset(html, -//W3C//DTD HTML 4.01//EN, )
|
||||||
|
SAX.startElement(html)
|
||||||
|
SAX.characters(
|
||||||
|
, 1)
|
||||||
|
SAX.startElement(head)
|
||||||
|
SAX.startElement(meta, http-equiv='\"content-type\"', content='\"text/html;charset=utf-8\"')
|
||||||
|
SAX.endElement(meta)
|
||||||
|
SAX.endElement(head)
|
||||||
|
SAX.characters(
|
||||||
|
, 1)
|
||||||
|
SAX.startElement(body)
|
||||||
|
SAX.characters(
|
||||||
|
, 1)
|
||||||
|
SAX.endElement(body)
|
||||||
|
SAX.characters(
|
||||||
|
, 1)
|
||||||
|
SAX.endElement(html)
|
||||||
|
SAX.characters(
|
||||||
|
, 1)
|
||||||
|
SAX.endDocument()
|
6
test/HTML/issue318.html
Normal file
6
test/HTML/issue318.html
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<!DOCTYPE html PUBLIC '-//W3C//DTD HTML 4.01//EN'>
|
||||||
|
<html>
|
||||||
|
<head><meta http-equiv=\"content-type\" content=\"text/html;charset=utf-8\"></head>
|
||||||
|
<body>
|
||||||
|
</body>
|
||||||
|
</html>
|
Reference in New Issue
Block a user