8 use XML::Atom::Util qw(encode_xml);
11 eval q{use Test::More skip_all => "HTML::TreeBuilder or XML::Atom::Util not available"};
14 eval q{use Test::More tests => 7};
16 use_ok("IkiWiki::Plugin::htmlbalance");
19 is(IkiWiki::Plugin::htmlbalance::sanitize(content => "<br></br>"), "<br />");
20 is(IkiWiki::Plugin::htmlbalance::sanitize(content => "<div><p b=\"c\">hello world</div>"), "<div><p b=\"c\">hello world</p></div>");
21 is(IkiWiki::Plugin::htmlbalance::sanitize(content => "<a></a></a>"), "<a></a>");
22 is(IkiWiki::Plugin::htmlbalance::sanitize(content => "<b>foo <a</b>"), "<b>foo </b>");
23 is(IkiWiki::Plugin::htmlbalance::sanitize(content => "<b> foo <a</a></b>"), "<b> foo </b>");
24 is(IkiWiki::Plugin::htmlbalance::sanitize(content => "a>"), "a>");