use strict;
use IkiWiki 2.00;
use HTML::TreeBuilder;
-use XML::Atom::Util qw(encode_xml);
+use HTML::Entities;
sub import { #{{{
hook(type => "getsetup", id => "htmlbalance", call => \&getsetup);
$node->delete();
}
else {
- $ret .= encode_xml($node);
+ $ret .= encode_entities($node);
}
}
$tree->delete();
`XML::Atom::Util` for encoding entities? The former is already an ikiwiki
dependency (via [[!cpan HTML::Parser]]).
+> Now switched to HTML::Entities --[[Joey]]
+
I also wonder if there's any benefit to using this plugin aside from with
aggregate. Perhaps a small one but aggregate seems like the main case..
wondering if it would be better to just have aggregate balanace the html
BEGIN {
eval q{
use HTML::TreeBuilder;
- use XML::Atom::Util qw(encode_xml);
};
if ($@) {
- eval q{use Test::More skip_all => "HTML::TreeBuilder or XML::Atom::Util not available"};
+ eval q{use Test::More skip_all => "HTML::TreeBuilder not available"};
}
else {
eval q{use Test::More tests => 7};