After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 719515 - The push version of the HTML parser does not honour HTML_PARSE_NODEFDTD
The push version of the HTML parser does not honour HTML_PARSE_NODEFDTD
Status: RESOLVED FIXED
Product: libxml2
Classification: Platform
Component: general
git master
Other Mac OS
: Normal normal
: ---
Assigned To: Daniel Veillard
libxml QA maintainers
Depends on:
Blocks:
 
 
Reported: 2013-11-28 20:36 UTC by Arnold Hendriks
Modified: 2013-11-29 06:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
The attached patch fixes htmlParseTryOrFinish to interpret HTML_PARSE_NODEFDTD, and updates xmllint to actually pass --nodefdtd to the push version of the parser (967 bytes, patch)
2013-11-28 20:36 UTC, Arnold Hendriks
none Details | Review

Description Arnold Hendriks 2013-11-28 20:36:10 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
Comment 1 Daniel Veillard 2013-11-29 06:16:17 UTC
Yes, makes sense, applied and pushed:

https://git.gnome.org/browse/libxml2/commit/?id=826bc320206f70fccd2941a77d363e95e8076898

  thanks !

Daniel