Photos
Blog
Projects
vanrenterghem.biz
projects
/
git.ikiwiki.info.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge commit 'intrigeri/po' into po
[git.ikiwiki.info.git]
/
IkiWiki
/
Plugin
/
htmlscrubber.pm
diff --git
a/IkiWiki/Plugin/htmlscrubber.pm
b/IkiWiki/Plugin/htmlscrubber.pm
index 923907b047b8657e03857c91a500df5eb18911c5..7398c84784632048c41eab1976436578a8bf7027 100644
(file)
--- a/
IkiWiki/Plugin/htmlscrubber.pm
+++ b/
IkiWiki/Plugin/htmlscrubber.pm
@@
-41,10
+41,26
@@
sub getsetup () { #{{{
safe => 1,
rebuild => undef,
},
safe => 1,
rebuild => undef,
},
+ htmlscrubber_skip => {
+ type => "pagespec",
+ example => "!*/Discussion",
+ description => "PageSpec specifying pages not to scrub",
+ link => "ikiwiki/PageSpec",
+ safe => 1,
+ rebuild => undef,
+ },
} #}}}
sub sanitize (@) { #{{{
my %params=@_;
} #}}}
sub sanitize (@) { #{{{
my %params=@_;
+
+ if (exists $config{htmlscrubber_skip} &&
+ length $config{htmlscrubber_skip} &&
+ exists $params{destpage} &&
+ pagespec_match($params{destpage}, $config{htmlscrubber_skip})) {
+ return $params{content};
+ }
+
return scrubber()->scrub($params{content});
} # }}}
return scrubber()->scrub($params{content});
} # }}}