GNOME Bugzilla – Bug 719515
The push version of the HTML parser does not honour HTML_PARSE_NODEFDTD
Last modified: 2013-11-29 06:16:17 UTC
Created attachment 263072 [details] [review] The attached patch fixes htmlParseTryOrFinish to interpret HTML_PARSE_NODEFDTD, and updates xmllint to actually pass --nodefdtd to the push version of the parser The push version of the parser does not honour the HTML_PARSE_NODEFDTD option. (Additionally, it turned out xmllint does not pass options to the html push parser) The command echo "test" > /tmp/testfile.html ; ./xmllint --nodefdtd --html --push /tmp/testfile.html returns <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> <html><body><p>test </p></body></html> Expected was <html><body><p>test </p></body></html> The attached patch fixes htmlParseTryOrFinish to interpret HTML_PARSE_NODEFDTD, and updates xmllint to actually pass --nodefdtd to the push version of the parser
Yes, makes sense, applied and pushed: https://git.gnome.org/browse/libxml2/commit/?id=826bc320206f70fccd2941a77d363e95e8076898 thanks ! Daniel