mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-08-01 10:06:59 +03:00
html: Don't check for valid XML characters
This commit is contained in:
10
HTMLparser.c
10
HTMLparser.c
@ -462,10 +462,6 @@ htmlCurrentChar(xmlParserCtxtPtr ctxt, int *len) {
|
|||||||
if (val < 0x80)
|
if (val < 0x80)
|
||||||
goto encoding_error;
|
goto encoding_error;
|
||||||
}
|
}
|
||||||
if (!IS_CHAR(val)) {
|
|
||||||
htmlParseErrInt(ctxt, XML_ERR_INVALID_CHAR,
|
|
||||||
"Char 0x%X out of allowed range\n", val);
|
|
||||||
}
|
|
||||||
return(val);
|
return(val);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3414,12 +3410,8 @@ htmlParseComment(htmlParserCtxtPtr ctxt, int bogus) {
|
|||||||
}
|
}
|
||||||
buf = tmp;
|
buf = tmp;
|
||||||
}
|
}
|
||||||
if (IS_CHAR(cur)) {
|
|
||||||
COPY_BUF(buf,len,cur);
|
COPY_BUF(buf,len,cur);
|
||||||
} else {
|
|
||||||
htmlParseErrInt(ctxt, XML_ERR_INVALID_CHAR,
|
|
||||||
"Invalid char in comment 0x%X\n", cur);
|
|
||||||
}
|
|
||||||
if (len > maxLength) {
|
if (len > maxLength) {
|
||||||
htmlParseErr(ctxt, XML_ERR_COMMENT_NOT_FINISHED,
|
htmlParseErr(ctxt, XML_ERR_COMMENT_NOT_FINISHED,
|
||||||
"comment too long", NULL, NULL);
|
"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 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.setDocumentLocator()
|
||||||
SAX.startDocument()
|
SAX.startDocument()
|
||||||
SAX.error: Invalid char in comment 0xC
|
SAX.comment(<!doctype
|
||||||
SAX.comment(<!doctype
|
|
||||||
)
|
)
|
||||||
SAX.endDocument()
|
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 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.setDocumentLocator()
|
||||||
SAX.startDocument()
|
SAX.startDocument()
|
||||||
SAX.error: Invalid char in comment 0xC
|
SAX.comment(<!dOctYPE
|
||||||
SAX.comment(<!dOctYPE
|
|
||||||
)
|
)
|
||||||
SAX.endDocument()
|
SAX.endDocument()
|
||||||
|
Reference in New Issue
Block a user