]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Plugin/htmlscrubber.pm
add plugin safe/rebuild info (part 1 of 2)
[ikiwiki.git] / IkiWiki / Plugin / htmlscrubber.pm
index 3bdaccea119ec0e1b289a0da2f6d90e2219b8d66..923907b047b8657e03857c91a500df5eb18911c5 100644 (file)
@@ -10,6 +10,7 @@ use IkiWiki 2.00;
 our $safe_url_regexp;
 
 sub import { #{{{
+       hook(type => "getsetup", id => "htmlscrubber", call => \&getsetup);
        hook(type => "sanitize", id => "htmlscrubber", call => \&sanitize);
 
        # Only known uri schemes are allowed to avoid all the ways of
@@ -34,6 +35,14 @@ sub import { #{{{
        $safe_url_regexp=qr/^(?:(?:$uri_schemes):|data:image\/|[^:]+(?:$|\/))/i;
 } # }}}
 
+sub getsetup () { #{{{
+       return
+               plugin => {
+                       safe => 1,
+                       rebuild => undef,
+               },
+} #}}}
+
 sub sanitize (@) { #{{{
        my %params=@_;
        return scrubber()->scrub($params{content});