]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/htmlscrubber.pm
web commit by shoesorder
[git.ikiwiki.info.git] / IkiWiki / Plugin / htmlscrubber.pm
index 41cf6c991c868bb95c3a1bc74dbfbad4e3cf4368..3035307c246001acefd8e3bd945a6f3b8280520b 100644 (file)
@@ -6,12 +6,12 @@ use strict;
 use IkiWiki;
 
 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;
@@ -43,7 +43,8 @@ sub scrubber { #{{{
                        selected shape size span src start summary
                        tabindex target title type usemap valign
                        value vspace width
-               }}],
+               }, "/" => 1, # emit proper <hr /> XHTML
+               }],
        );
        return $_scrubber;
 } # }}}