Revert "Revert "Fix a bug with links to pages whose names contained colons.""

This reverts commit 810a355308.

I double-checked, and the change seems ok after all, actually.
master
Joey Hess 2008-07-11 10:31:08 -04:00
parent 2aecd4a59a
commit 98bd33eee4
1 changed files with 6 additions and 1 deletions

View File

@ -539,7 +539,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;
} #}}}