Re: [xml] Adding default DOCTYPE when HTML document doesn't have any
- From: Damian Pietras <daper daper net>
- To: Daniel Veillard <veillard redhat com>
- Cc: xml gnome org
- Subject: Re: [xml] Adding default DOCTYPE when HTML document doesn't have any
- Date: Mon, 26 Jul 2010 15:39:29 +0200
On Mon, Jul 26, 2010 at 01:57:16PM +0200, Daniel Veillard wrote:
this is added automatically at the end of htmlParseDocument() if no
doctype was found, and until now there is no option to turn this off.
Since this is an arbitrary behaviour from libxml2, and while this can
be fixed (by finding and removing said DTD from the resulting tree),
I think it's best to provide a new HTML_PARSE_NODEFDTD parsing option
for the HTML parser to avoid this. The code is actually fairly simple,
I'm attaching the patch I will commit soon,
Such option will be really useful for me, thanks!
] [Thread Prev