]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki.pm
not yet released
[ikiwiki.git] / IkiWiki.pm
index 03b4b666e82dc6165653d935f5e37521344fa45a..5a05a0f73ddf68e8bb624ac7ca74d2965dab9277 100644 (file)
@@ -538,7 +538,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;
 } #}}}
@@ -596,7 +601,7 @@ sub htmllink ($$$;@) { #{{{
                        return "<span class=\"createlink\"><a href=\"".
                                cgiurl(
                                        do => "create",
-                                       page => pagetitle(lc($link), 1),
+                                       page => lc($link),
                                        from => $lpage
                                ).
                                "\" rel=\"nofollow\">?</a>$linktext</span>"