X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/9f141841efc80dbe7a3ef8cc8fbae102c9cd190b..ecf2408bf64de1aee3bb8b79f6e28c14b52cf1c4:/IkiWiki.pm diff --git a/IkiWiki.pm b/IkiWiki.pm index 2a3a84d9a..6747a3ba4 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -100,7 +100,7 @@ sub getsetup () { type => "string", default => '', example => "/var/www/wiki/ikiwiki.cgi", - description => "cgi wrapper to generate", + description => "filename of cgi wrapper to generate", safe => 0, # file rebuild => 0, }, @@ -949,16 +949,16 @@ sub formattime ($;$) { sub beautify_urlpath ($) { my $url=shift; - if ($config{usedirs}) { - $url =~ s!/index.$config{htmlext}$!/!; - } - # Ensure url is not an empty link, and if necessary, # add ./ to avoid colon confusion. - if ($url !~ /^\// && $url !~ /^\.\.\//) { + if ($url !~ /^\// && $url !~ /^\.\.?\//) { $url="./$url"; } + if ($config{usedirs}) { + $url =~ s!/index.$config{htmlext}$!/!; + } + return $url; }