Subject: | Warning for Invalid Tag Not Silenced under recover => 2 |
Date: | Mon, 24 May 2010 14:41:37 -0700 |
To: | bug-xml-libxml [...] rt.cpan.org |
From: | "David E. Wheeler" <dwheeler [...] cpan.org> |
Here's the example:
my $parser = XML::LibXML->new(
recover => 2,
no_network => 1,
);
$parser->parse_html_string('<foo>hi</foo>');
print "Done\n";
And the output:
HTML parser error : Tag foo invalid
<foo>hi</foo>
^
Done
By the "Done" I can see that it's not a fatal error. But because I've set `recover => 2` it shouldn't appear at all.
Curiously, I get the same output if I add
local $SIG{__WARN__};
So maybe it's libxml2 that's issuing the warning? Either way, I'd like it to stop, as I have a lot of bogus HTML to parse.
XML::LibXML 1.70.
Thanks,
David