X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/6b5b0a3282a1409476beb498030e035c5b462440..c91b39fdb52c935fbca20ca55a256278f4661a5b:/IkiWiki.pm diff --git a/IkiWiki.pm b/IkiWiki.pm index 3a4cfd5e7..ef8ccb2da 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -1068,6 +1068,14 @@ sub baseurl (;$) { return $page; } +sub urlabs ($$) { + my $url=shift; + my $urlbase=shift; + + eval q{use URI}; + URI->new_abs($url, $urlbase)->as_string; +} + sub abs2rel ($$) { # Work around very innefficient behavior in File::Spec if abs2rel # is passed two relative paths. It's much faster if paths are @@ -1931,7 +1939,7 @@ sub misctemplate ($$;@) { title => $title, wikiname => $config{wikiname}, content => $content, - baseurl => $config{url}, + baseurl => $config{url}.'/', html5 => $config{html5}, %params, );