summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess <joey@kodama.kitenet.net>2008-07-11 10:31:08 -0400
committerJoey Hess <joey@kodama.kitenet.net>2008-07-11 10:31:08 -0400
commit98bd33eee47852021b360795cf0d6dd041bcebb7 (patch)
treeb8034f5384ea3fb6788f4795bd3ac4a6c716f5fa
parent2aecd4a59a84eabe63de5280b28cb9c24b1e7d55 (diff)
Revert "Revert "Fix a bug with links to pages whose names contained colons.""
This reverts commit 810a355308d276ef922ff4312bff0c7935676633. I double-checked, and the change seems ok after all, actually.
-rw-r--r--IkiWiki.pm7
1 files changed, 6 insertions, 1 deletions
diff --git a/IkiWiki.pm b/IkiWiki.pm
index 4368870b8..6e03121c0 100644
--- a/IkiWiki.pm
+++ b/IkiWiki.pm
@@ -539,7 +539,12 @@ sub beautify_url ($) { #{{{
if ($config{usedirs}) {
$url =~ s!/index.$config{htmlext}$!/!;
}
- $url =~ s!^$!./!; # Browsers don't like empty links...
+
+ # Ensure url is not an empty link, and
+ # if it's relative, make that explicit to avoid colon confusion.
+ if ($url !~ /\//) {
+ $url="./$url";
+ }
return $url;
} #}}}