]> scripts.mit.edu Git - www/ikiwiki.git/blobdiff - IkiWiki.pm
Revert "Fix a bug with links to pages whose names contained colons."
[www/ikiwiki.git] / IkiWiki.pm
index 5a05a0f73ddf68e8bb624ac7ca74d2965dab9277..4368870b837f26d4f9ee9891b1dcfd717a8a35a7 100644 (file)
@@ -1,6 +1,7 @@
 #!/usr/bin/perl
 
 package IkiWiki;
+
 use warnings;
 use strict;
 use Encode;
@@ -538,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;
 } #}}}