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
parent
2aecd4a59a
commit
98bd33eee4
|
@ -539,7 +539,12 @@ sub beautify_url ($) { #{{{
|
||||||
if ($config{usedirs}) {
|
if ($config{usedirs}) {
|
||||||
$url =~ s!/index.$config{htmlext}$!/!;
|
$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;
|
return $url;
|
||||||
} #}}}
|
} #}}}
|
||||||
|
|
Loading…
Reference in New Issue