use warnings;
use strict;
-use IkiWiki;
+use IkiWiki 2.00;
sub import { #{{{
- IkiWiki::hook(type => "sanitize", id => "htmlscrubber",
- call => \&sanitize);
+ hook(type => "sanitize", id => "htmlscrubber", call => \&sanitize);
} # }}}
-sub sanitize ($) { #{{{
- return scrubber()->scrub(shift);
+sub sanitize (@) { #{{{
+ my %params=@_;
+ return scrubber()->scrub($params{content});
} # }}}
my $_scrubber;
return $_scrubber if defined $_scrubber;
eval q{use HTML::Scrubber};
+ error($@) if $@;
# Lists based on http://feedparser.org/docs/html-sanitization.html
$_scrubber = HTML::Scrubber->new(
allow => [qw{