Really fix bug with links to pages with names containing colons
authorJoey Hess <joey@kodama.kitenet.net>
Mon, 21 Jul 2008 21:26:54 +0000 (17:26 -0400)
committerJoey Hess <joey@kodama.kitenet.net>
Mon, 21 Jul 2008 21:27:14 +0000 (17:27 -0400)
Previous fix mised a few cases.

IkiWiki.pm
debian/changelog
doc/bugs/No_link_for_blog_items_when_filename_contains_a_colon.mdwn

index 063cef8e09220dc2beaea0eabf1afea759368a31..c14124f79f221fdd638d6f781b205e87bd6193a0 100644 (file)
@@ -538,7 +538,7 @@ sub beautify_urlpath ($) { #{{{
 
        # Ensure url is not an empty link, and
        # if it's relative, make that explicit to avoid colon confusion.
-       if ($url !~ /\//) {
+       if ($url !~ /^\//) {
                $url="./$url";
        }
 
index a54d797bdf6b9109a051d4f081489de89083f48b..86a7703573bf6c6f8f0a691ad878488351a01683 100644 (file)
@@ -5,6 +5,8 @@ ikiwiki (2.55) UNRELEASED; urgency=low
   * editpage: Don't show attachments link when attachments are disabled.
   * tag: Allow tagbase to be overridden by starting a tag with "./" or "/".
     (Simon McVittie)
+  * Really fix bug with links to pages with names containing colons. 
+    Previous fix mised a few cases.
 
  -- Joey Hess <joeyh@debian.org>  Mon, 21 Jul 2008 11:35:46 -0400
 
index 78f6d6cac0a0ef8d7a6f99042e0f5088ff58a859..313c1adddbf038df3bf16d46346652a07aa9c2a8 100644 (file)
@@ -54,8 +54,7 @@ At the moment I see two possible solutions:
 
 What do you think about that? Does the patch have any side-effects I didn't see?
 
-> What version of ikiwiki are you seeing it with? I fixed another
-> colon-bug in version 2.53; you'd need to rebuild any affected wikis to
-> get the fix. The relevant code is in `beautify_urlpath`, where it adds
-> "./" in front of every relative url. An example of it working in this
-> very wiki is a link to [[colon:problem]] --[[Joey]]
+> I almost really fixed this in 2.53, but missed one case. All fixed now
+> AFAICS. --[[Joey]]
+
+[[tag done]]