]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki.pm
web commit by http://jcflack.myopenid.com/
[ikiwiki.git] / IkiWiki.pm
index c7328e427c7bdb535aaac3f4c2586d6f6d31c95d..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>"
@@ -1344,7 +1349,7 @@ sub match_glob ($$;@) { #{{{
                $glob="$from/$glob" if length $from;
        }
 
-       my $regexp=glob2re($glob);
+       my $regexp=IkiWiki::glob2re($glob);
        if ($page=~/^$regexp$/i) {
                if (! IkiWiki::isinternal($page) || $params{internal}) {
                        return IkiWiki::SuccessReason->new("$glob matches $page");