use warnings;
use strict;
use IkiWiki 3.00;
-use HTML::TreeBuilder;
use HTML::Entities;
sub import {
my %params=@_;
my $ret = '';
+ eval q{use HTML::TreeBuilder};
+ error $@ if $@;
my $tree = HTML::TreeBuilder->new();
$tree->ignore_unknown(0);
$tree->ignore_ignorable_whitespace(0);
my @nodes = $tree->disembowel();
foreach my $node (@nodes) {
if (ref $node) {
- $ret .= $node->as_XML();
+ $ret .= $node->as_HTML(undef, '', {});
chomp $ret;
$node->delete();
}