Subject: | Null namespace causes warnings |
I know HTML is supposed to be in a namespace, but I got lazy and did something like the following:
use HTML::HTML5::Parser;
use HTML::HTML5::Writer;
use XML::LibXML;
my $parser = HTML::HTML5::Parser->new;
my $doc = $parser->parse_string(<<'EOT');
<html/>
EOT
my $el = XML::LibXML::Element->new('p');
$doc->getDocumentElement->appendChild($el);
my $writer = HTML::HTML5::Writer->new();
$writer->document($doc);
This causes the following message to be printed:
Use of uninitialized value in string eq at Writer.pm line 177
Just needs a change to "unless $element->namespaceURI && $element->namespaceURI eq 'http://www.w3.org/1999/xhtml';" on that line.