]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commitdiff
htmlbalance: be compatible with HTML::Tree 4.0
authorSimon McVittie <smcv@debian.org>
Sun, 26 Sep 2010 21:12:10 +0000 (22:12 +0100)
committerSimon McVittie <smcv@debian.org>
Sun, 26 Sep 2010 21:33:54 +0000 (22:33 +0100)
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.

IkiWiki/Plugin/htmlbalance.pm

index 26f8e494bf537dba9f2b0c967c71fb9f26067b84..da450eea7ef691c8f16ed4e5a20a2603b0491c22 100644 (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();
                }