http://www.perlmonks.org?node_id=1034963


in reply to HTML::TreeBuilder, HTML::Element, as_XML()

IMnsHO, there is a bug in the _valid_name subroutine deep in HTML::Element. There should be

return (0) unless ( $attr =~ /^$START_CHAR$NAME_CHAR*$/ );
not
return (0) unless ( $attr =~ /^$START_CHAR$NAME_CHAR+$/ );

The XML specs say that

Name ::= NameStartChar (NameChar)*

Jenda
Enoch was right!
Enjoy the last years of Rome.