diff options
author | Simon McVittie <smcv@debian.org> | 2016-01-21 08:40:14 +0000 |
---|---|---|
committer | Simon McVittie <smcv@debian.org> | 2016-01-21 08:40:14 +0000 |
commit | 7aca0d40a359e0b9b31b7dc9327dba76da51c85c (patch) | |
tree | 37dc9e2aed5882cea922e1a13f6a920e53304253 /IkiWiki | |
parent | 816c856a46dd2df6b763a72dd512849c5396e61d (diff) | |
download | ikiwiki-7aca0d40a359e0b9b31b7dc9327dba76da51c85c.tar ikiwiki-7aca0d40a359e0b9b31b7dc9327dba76da51c85c.tar.gz |
Compose relative URLs in RSS feeds correctly
If the relative link from the (page generating the) RSS to the target
would start with "./" or "../", just concatenating it with the URL to
the directory containing the RSS is not sufficient. Go via
URI::new_abs to fix this.
Diffstat (limited to 'IkiWiki')
-rw-r--r-- | IkiWiki/Plugin/inline.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm index 5ea5f35af..c3895d982 100644 --- a/IkiWiki/Plugin/inline.pm +++ b/IkiWiki/Plugin/inline.pm @@ -613,7 +613,7 @@ sub absolute_urls ($$) { $v=$baseurl.$v; # anchor } elsif ($dv=~/^(?!\w+:)[^\/]/) { - $v=$url.$v; # relative url + $v=URI->new_abs($v, $url)->canonical; # relative url } elsif ($dv=~/^\//) { if (! defined $urltop) { |