summaryrefslogtreecommitdiff
path: root/HTMLparser.c
diff options
context:
space:
mode:
authorDaniel Veillard <veillard@src.gnome.org>2003-11-20 21:59:12 +0000
committerDaniel Veillard <veillard@src.gnome.org>2003-11-20 21:59:12 +0000
commitc59d826ef94d75622421ae8f47e54a8b38ad6123 (patch)
treea276f92f945b7910bc653c9ce1fc4509731b9f24 /HTMLparser.c
parent16ed597a93739ff63d5b26c97978b3696511a8e0 (diff)
downloadlibxml2-c59d826ef94d75622421ae8f47e54a8b38ad6123.tar.gz
applied two parsing fixes from James Bursa Daniel
* HTMLparser.c: applied two parsing fixes from James Bursa Daniel
Diffstat (limited to 'HTMLparser.c')
-rw-r--r--HTMLparser.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/HTMLparser.c b/HTMLparser.c
index fa9519d4..a2d76166 100644
--- a/HTMLparser.c
+++ b/HTMLparser.c
@@ -2880,7 +2880,7 @@ htmlParseCharRef(htmlParserCtxtPtr ctxt) {
int val = 0;
if ((CUR == '&') && (NXT(1) == '#') &&
- (NXT(2) == 'x')) {
+ ((NXT(2) == 'x') || NXT(2) == 'X')) {
SKIP(3);
while (CUR != ';') {
if ((CUR >= '0') && (CUR <= '9'))
@@ -3253,6 +3253,8 @@ htmlParseStartTag(htmlParserCtxtPtr ctxt) {
htmlParseErr(ctxt, XML_HTML_STRUCURE_ERROR,
"htmlParseStartTag: misplaced <body> tag\n",
name, NULL);
+ while ((IS_CHAR_CH(CUR)) && (CUR != '>'))
+ NEXT;
return;
}
}