X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/05124f9a86dadca50c693d57f8fc8398fb5d8be9..7829752f375e6923583c1aa43dbf88828ab4b8e6:/IkiWiki.pm diff --git a/IkiWiki.pm b/IkiWiki.pm index 0b420e824..4de8f71d6 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -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; } #}}} @@ -713,7 +718,9 @@ sub preprocess ($$$;$$) { #{{{ my $prefix=shift; my $command=shift; my $params=shift; - if (length $escape) { + $params="" if ! defined $params; + + f (length $escape) { return "[[$prefix$command $params]]"; } elsif (exists $hooks{preprocess}{$command}) {