]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commitdiff
Revert "Fix a bug with links to pages whose names contained colons."
authorJoey Hess <joey@kodama.kitenet.net>
Fri, 11 Jul 2008 13:52:17 +0000 (09:52 -0400)
committerJoey Hess <joey@kodama.kitenet.net>
Fri, 11 Jul 2008 13:52:17 +0000 (09:52 -0400)
This reverts commit e25c3a0a7caa9783c657efe86611929ecb7bd4a3.

I didn't think that through far enough; beautify_url may be called on full
urls, which don't start with "/"!

Conflicts:

debian/changelog

IkiWiki.pm

index 6e03121c078242c9ef35d2d050224b7f3d79c3ff..4368870b837f26d4f9ee9891b1dcfd717a8a35a7 100644 (file)
@@ -539,12 +539,7 @@ sub beautify_url ($) { #{{{
        if ($config{usedirs}) {
                $url =~ s!/index.$config{htmlext}$!/!;
        }
-
-       # Ensure url is not an empty link, and
-       # if it's relative, make that explicit to avoid colon confusion.
-       if ($url !~ /\//) {
-               $url="./$url";
-       }
+       $url =~ s!^$!./!; # Browsers don't like empty links...
 
        return $url;
 } #}}}