From: Simon McVittie Date: Sun, 26 Sep 2010 21:12:10 +0000 (+0100) Subject: htmlbalance: be compatible with HTML::Tree 4.0 X-Git-Tag: 3.20100926~2^2 X-Git-Url: http://git.tremily.us/?p=ikiwiki.git;a=commitdiff_plain;h=5876968fa1ff1225542d2afd836d1027276bab44 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. --- diff --git a/IkiWiki/Plugin/htmlbalance.pm b/IkiWiki/Plugin/htmlbalance.pm index 26f8e494b..da450eea7 100644 --- a/IkiWiki/Plugin/htmlbalance.pm +++ b/IkiWiki/Plugin/htmlbalance.pm @@ -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(); }