beautify_urlpath: if path already starts with ./, don't add another ./
authorSimon McVittie <smcv@ http://smcv.pseudorandom.co.uk/>
Sun, 21 Dec 2008 15:24:42 +0000 (15:24 +0000)
committerSimon McVittie <smcv@ http://smcv.pseudorandom.co.uk/>
Sun, 21 Dec 2008 15:24:42 +0000 (15:24 +0000)
IkiWiki.pm

index 97c835cf6281c986600af120b1338a4ac01392d1..6747a3ba45b7bf11bfec18319f85c7963a82c7c9 100644 (file)
@@ -951,7 +951,7 @@ sub beautify_urlpath ($) {
 
        # Ensure url is not an empty link, and if necessary,
        # add ./ to avoid colon confusion.
-       if ($url !~ /^\// && $url !~ /^\.\.\//) {
+       if ($url !~ /^\// && $url !~ /^\.\.?\//) {
                $url="./$url";
        }