summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2010-08-19 13:59:31 -0400
committerJoey Hess <joey@kitenet.net>2010-08-19 13:59:31 -0400
commit9b9ecda62f893a2109ccdb6bcdb2358f217f7fef (patch)
tree3e0d30d26fa1b6dcc34a76992079b3c5166049d0
parent6e7ae22ed22e1dc94d41203de5ddda9fac75edac (diff)
htmlscrubber: Do not scrub url anchors that contain colons.
-rw-r--r--IkiWiki/Plugin/htmlscrubber.pm2
-rw-r--r--debian/changelog1
-rw-r--r--doc/bugs/htmlscrubber_breaks_multimarkdown_footnotes.mdwn5
3 files changed, 7 insertions, 1 deletions
diff --git a/IkiWiki/Plugin/htmlscrubber.pm b/IkiWiki/Plugin/htmlscrubber.pm
index 847518178..927792f79 100644
--- a/IkiWiki/Plugin/htmlscrubber.pm
+++ b/IkiWiki/Plugin/htmlscrubber.pm
@@ -32,7 +32,7 @@ sub import {
);
# data is a special case. Allow a few data:image/ types,
# but disallow data:text/javascript and everything else.
- $safe_url_regexp=qr/^(?:(?:$uri_schemes):|data:image\/(?:png|jpeg|gif)|[^:]+(?:$|[\/\?]))/i;
+ $safe_url_regexp=qr/^(?:(?:$uri_schemes):|data:image\/(?:png|jpeg|gif)|[^:]+(?:$|[\/\?#]))|^#/i;
}
sub getsetup () {
diff --git a/debian/changelog b/debian/changelog
index 8fee36b98..fb445a3ff 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -9,6 +9,7 @@ ikiwiki (3.20100816) UNRELEASED; urgency=low
(and MSIE 8 in compat mode). Thanks to Iain McLaren for reporting
the bug and providing access to debug it.
* style.css: Use relative, not absolute font sizes. Thanks, Giuseppe Bilotta.
+ * htmlscrubber: Do not scrub url anchors that contain colons.
-- Joey Hess <joeyh@debian.org> Sun, 15 Aug 2010 11:45:48 -0400
diff --git a/doc/bugs/htmlscrubber_breaks_multimarkdown_footnotes.mdwn b/doc/bugs/htmlscrubber_breaks_multimarkdown_footnotes.mdwn
index a00ced4c5..343037b45 100644
--- a/doc/bugs/htmlscrubber_breaks_multimarkdown_footnotes.mdwn
+++ b/doc/bugs/htmlscrubber_breaks_multimarkdown_footnotes.mdwn
@@ -11,3 +11,8 @@ enabled, the links are created but their hrefs are empty (so they do not actuall
Disabling the htmlscrubber plugin fixes this issue
[[!tag multimarkdown htmlscrubber]]
+
+> href was of the form: #fnref:1 , scrubbed by overzealous protocol
+> scrubbing.
+
+[[done]] --[[Joey]]