From d73d4fed0313db5f7dd08498871c304888d8d5e8 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 11 Jul 2008 10:33:41 -0400 Subject: [PATCH] rename beautify_url to stress it only works on the path component --- IkiWiki.pm | 8 ++++---- IkiWiki/Plugin/recentchanges.pm | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/IkiWiki.pm b/IkiWiki.pm index 6e03121c0..c1d9119e8 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -533,7 +533,7 @@ sub displaytime ($;$) { #{{{ return decode_utf8(POSIX::strftime($format, localtime($time))); } #}}} -sub beautify_url ($) { #{{{ +sub beautify_urlpath ($) { #{{{ my $url=shift; if ($config{usedirs}) { @@ -554,7 +554,7 @@ sub urlto ($$) { #{{{ my $from=shift; if (! length $to) { - return beautify_url(baseurl($from)."index.$config{htmlext}"); + return beautify_urlpath(baseurl($from)."index.$config{htmlext}"); } if (! $destsources{$to}) { @@ -563,7 +563,7 @@ sub urlto ($$) { #{{{ my $link = abs2rel($to, dirname(htmlpage($from))); - return beautify_url($link); + return beautify_urlpath($link); } #}}} sub htmllink ($$$;@) { #{{{ @@ -610,7 +610,7 @@ sub htmllink ($$$;@) { #{{{ } $bestlink=abs2rel($bestlink, dirname(htmlpage($page))); - $bestlink=beautify_url($bestlink); + $bestlink=beautify_urlpath($bestlink); if (! $opts{noimageinline} && isinlinableimage($bestlink)) { return "\"$linktext\""; diff --git a/IkiWiki/Plugin/recentchanges.pm b/IkiWiki/Plugin/recentchanges.pm index bc069fbf2..8383fb72a 100644 --- a/IkiWiki/Plugin/recentchanges.pm +++ b/IkiWiki/Plugin/recentchanges.pm @@ -80,7 +80,7 @@ sub cgi ($) { #{{{ "

"); } else { - IkiWiki::redirect($cgi, $config{url}.IkiWiki::beautify_url("/".htmlpage($link))); + IkiWiki::redirect($cgi, $config{url}.IkiWiki::beautify_urlpath("/".htmlpage($link))); } exit; -- 2.26.2