htmlbalance: be compatible with HTML::Tree 4.0

The HTML::Tree changelog says:

    [THINGS THAT MAY BREAK YOUR CODE OR TESTS]
    ...
    * Attribute names are now validated in as_XML and invalid names will
      cause an error.

and indeed the regression tests do get an error.
master
Simon McVittie 2010-09-26 22:12:10 +01:00
parent b4471d4418
commit 5876968fa1
1 changed files with 1 additions and 1 deletions

View File

@ -43,7 +43,7 @@ sub sanitize (@) {
my @nodes = $tree->disembowel();
foreach my $node (@nodes) {
if (ref $node) {
$ret .= $node->as_XML();
$ret .= $node->as_HTML(undef, '', {});
chomp $ret;
$node->delete();
}