]> sipb.mit.edu Git - ikiwiki.git/commitdiff
htmlscrubber: Do not scrub url anchors that contain colons.
authorJoey Hess <joey@kitenet.net>
Thu, 19 Aug 2010 17:59:31 +0000 (13:59 -0400)
committerJoey Hess <joey@kitenet.net>
Thu, 19 Aug 2010 17:59:31 +0000 (13:59 -0400)
IkiWiki/Plugin/htmlscrubber.pm
debian/changelog
doc/bugs/htmlscrubber_breaks_multimarkdown_footnotes.mdwn

index 8475181780db55cfd1b0e0846f277e44fa87e156..927792f791f2160232671e1327db2a379a496e9d 100644 (file)
@@ -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 () {
index 8fee36b980d344cb6ef754e9d728137f4937b214..fb445a3fffdbaa93f9ea58aadf43659aa84a6384 100644 (file)
@@ -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
 
index a00ced4c5550f85a3cbba1591e0a4f7aff3372dc..343037b456044024076ff39d8fd3da36d1afa0f5 100644 (file)
@@ -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]]