diff options
-rw-r--r-- | IkiWiki.pm | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/IkiWiki.pm b/IkiWiki.pm index 6e03121c0..4368870b8 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -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; } #}}} |