summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin
diff options
context:
space:
mode:
authorJoey Hess <joey@kodama.kitenet.net>2008-02-10 15:24:03 -0500
committerJoey Hess <joey@kodama.kitenet.net>2008-02-10 15:24:03 -0500
commitdfd6bb3854c737131b40deba1c6b7b5d7ef2083e (patch)
tree62f2b6f68e3c9d73d17c5f6182a72caf4c38c7a2 /IkiWiki/Plugin
parent852994d950f09748a022a65f94af59f7cafb6df8 (diff)
fix data:image handling
Diffstat (limited to 'IkiWiki/Plugin')
-rw-r--r--IkiWiki/Plugin/htmlscrubber.pm7
1 files changed, 3 insertions, 4 deletions
diff --git a/IkiWiki/Plugin/htmlscrubber.pm b/IkiWiki/Plugin/htmlscrubber.pm
index 25caa8a50..634674b9c 100644
--- a/IkiWiki/Plugin/htmlscrubber.pm
+++ b/IkiWiki/Plugin/htmlscrubber.pm
@@ -29,16 +29,15 @@ sub scrubber { #{{{
"ldap", "mid", "news", "nfs", "nntp", "pop", "pres",
"sip", "sips", "snmp", "tel", "urn", "wais", "xmpp",
"z39.50r", "z39.50s",
- # data is a special case. Allow data:text/<image>, but
- # disallow data:text/javascript and everything else.
- qr/data:text\/(?:png|gif|jpeg)/,
# Selected unofficial schemes
"about", "aim", "callto", "cvs", "ed2k", "feed", "fish", "gg",
"irc", "ircs", "lastfm", "ldaps", "magnet", "mms",
"msnim", "notes", "rsync", "secondlife", "skype", "ssh",
"sftp", "sms", "steam", "webcal", "ymsgr",
);
- my $link=qr/^(?:$uri_schemes:|[^:]+$)/i;
+ # data is a special case. Allow data:image/*, but
+ # disallow data:text/javascript and everything else.
+ my $link=qr/^(?:$uri_schemes:|data:image\/|[^:]+$)/i;
eval q{use HTML::Scrubber};
error($@) if $@;