diff --git a/HTMLparser.c b/HTMLparser.c index b56363a3..02d476f9 100644 --- a/HTMLparser.c +++ b/HTMLparser.c @@ -3045,7 +3045,7 @@ htmlParsePubidLiteral(htmlParserCtxtPtr ctxt) { NEXT; } - if (CUR != '"') { + if (CUR != quote) { htmlParseErr(ctxt, XML_ERR_LITERAL_NOT_FINISHED, "Unfinished PubidLiteral\n", NULL, NULL); } else { diff --git a/result/HTML/issue318.html b/result/HTML/issue318.html new file mode 100644 index 00000000..b3a01e43 --- /dev/null +++ b/result/HTML/issue318.html @@ -0,0 +1,6 @@ + + + + + + diff --git a/result/HTML/issue318.html.err b/result/HTML/issue318.html.err new file mode 100644 index 00000000..e69de29b diff --git a/result/HTML/issue318.html.sax b/result/HTML/issue318.html.sax new file mode 100644 index 00000000..f2f608b4 --- /dev/null +++ b/result/HTML/issue318.html.sax @@ -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() diff --git a/test/HTML/issue318.html b/test/HTML/issue318.html new file mode 100644 index 00000000..3bd0b694 --- /dev/null +++ b/test/HTML/issue318.html @@ -0,0 +1,6 @@ + + + + + +