rename beautify_url to stress it only works on the path component
parent
98bd33eee4
commit
d73d4fed03
|
@ -533,7 +533,7 @@ sub displaytime ($;$) { #{{{
|
||||||
return decode_utf8(POSIX::strftime($format, localtime($time)));
|
return decode_utf8(POSIX::strftime($format, localtime($time)));
|
||||||
} #}}}
|
} #}}}
|
||||||
|
|
||||||
sub beautify_url ($) { #{{{
|
sub beautify_urlpath ($) { #{{{
|
||||||
my $url=shift;
|
my $url=shift;
|
||||||
|
|
||||||
if ($config{usedirs}) {
|
if ($config{usedirs}) {
|
||||||
|
@ -554,7 +554,7 @@ sub urlto ($$) { #{{{
|
||||||
my $from=shift;
|
my $from=shift;
|
||||||
|
|
||||||
if (! length $to) {
|
if (! length $to) {
|
||||||
return beautify_url(baseurl($from)."index.$config{htmlext}");
|
return beautify_urlpath(baseurl($from)."index.$config{htmlext}");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! $destsources{$to}) {
|
if (! $destsources{$to}) {
|
||||||
|
@ -563,7 +563,7 @@ sub urlto ($$) { #{{{
|
||||||
|
|
||||||
my $link = abs2rel($to, dirname(htmlpage($from)));
|
my $link = abs2rel($to, dirname(htmlpage($from)));
|
||||||
|
|
||||||
return beautify_url($link);
|
return beautify_urlpath($link);
|
||||||
} #}}}
|
} #}}}
|
||||||
|
|
||||||
sub htmllink ($$$;@) { #{{{
|
sub htmllink ($$$;@) { #{{{
|
||||||
|
@ -610,7 +610,7 @@ sub htmllink ($$$;@) { #{{{
|
||||||
}
|
}
|
||||||
|
|
||||||
$bestlink=abs2rel($bestlink, dirname(htmlpage($page)));
|
$bestlink=abs2rel($bestlink, dirname(htmlpage($page)));
|
||||||
$bestlink=beautify_url($bestlink);
|
$bestlink=beautify_urlpath($bestlink);
|
||||||
|
|
||||||
if (! $opts{noimageinline} && isinlinableimage($bestlink)) {
|
if (! $opts{noimageinline} && isinlinableimage($bestlink)) {
|
||||||
return "<img src=\"$bestlink\" alt=\"$linktext\" />";
|
return "<img src=\"$bestlink\" alt=\"$linktext\" />";
|
||||||
|
|
|
@ -80,7 +80,7 @@ sub cgi ($) { #{{{
|
||||||
"</p>");
|
"</p>");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
IkiWiki::redirect($cgi, $config{url}.IkiWiki::beautify_url("/".htmlpage($link)));
|
IkiWiki::redirect($cgi, $config{url}.IkiWiki::beautify_urlpath("/".htmlpage($link)));
|
||||||
}
|
}
|
||||||
|
|
||||||
exit;
|
exit;
|
||||||
|
|
Loading…
Reference in New Issue