]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Plugin/htmlscrubber.pm
* Add an img plugin, based on Christian Mock's img plugin, but stripped
[ikiwiki.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;
 } # }}}