mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2024-10-26 12:25:09 +03:00
html: Don't check for valid XML characters
This commit is contained in:
parent
a6955c13c7
commit
9678163f54
12
HTMLparser.c
12
HTMLparser.c
@ -462,10 +462,6 @@ htmlCurrentChar(xmlParserCtxtPtr ctxt, int *len) {
|
||||
if (val < 0x80)
|
||||
goto encoding_error;
|
||||
}
|
||||
if (!IS_CHAR(val)) {
|
||||
htmlParseErrInt(ctxt, XML_ERR_INVALID_CHAR,
|
||||
"Char 0x%X out of allowed range\n", val);
|
||||
}
|
||||
return(val);
|
||||
}
|
||||
|
||||
@ -3414,12 +3410,8 @@ htmlParseComment(htmlParserCtxtPtr ctxt, int bogus) {
|
||||
}
|
||||
buf = tmp;
|
||||
}
|
||||
if (IS_CHAR(cur)) {
|
||||
COPY_BUF(buf,len,cur);
|
||||
} else {
|
||||
htmlParseErrInt(ctxt, XML_ERR_INVALID_CHAR,
|
||||
"Invalid char in comment 0x%X\n", cur);
|
||||
}
|
||||
|
||||
COPY_BUF(buf,len,cur);
|
||||
if (len > maxLength) {
|
||||
htmlParseErr(ctxt, XML_ERR_COMMENT_NOT_FINISHED,
|
||||
"comment too long", NULL, NULL);
|
||||
|
@ -1,3 +1,3 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||
<!--<!doctype
|
||||
<!--<!doctype
|
||||
-->
|
||||
|
@ -1,3 +0,0 @@
|
||||
./test/HTML/758606.html:1: HTML parser error : Invalid char in comment 0xC
|
||||
<!--<!doctype
|
||||
^
|
@ -1,6 +1,5 @@
|
||||
SAX.setDocumentLocator()
|
||||
SAX.startDocument()
|
||||
SAX.error: Invalid char in comment 0xC
|
||||
SAX.comment(<!doctype
|
||||
SAX.comment(<!doctype
|
||||
)
|
||||
SAX.endDocument()
|
||||
|
@ -1,3 +1,3 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||
<!--‘<!dOctYPE
|
||||
<!--‘<!dOctYPE
|
||||
-->
|
||||
|
@ -1,3 +0,0 @@
|
||||
./test/HTML/758606_2.html:1: HTML parser error : Invalid char in comment 0xC
|
||||
<!--
|
||||
^
|
@ -1,6 +1,5 @@
|
||||
SAX.setDocumentLocator()
|
||||
SAX.startDocument()
|
||||
SAX.error: Invalid char in comment 0xC
|
||||
SAX.comment(<!dOctYPE
|
||||
SAX.comment(<!dOctYPE
|
||||
)
|
||||
SAX.endDocument()
|
||||
|
Loading…
Reference in New Issue
Block a user