]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/inline.pm
Merge branch 'master' into debian-jessie-backports
[git.ikiwiki.info.git] / IkiWiki / Plugin / inline.pm
index 5ea5f35af64118581dd434efc6e4cdf61bed55b4..19dd684dda4bebd8635d18309139fec2ab4fa795 100644 (file)
@@ -183,7 +183,7 @@ sub preprocess_inline (@) {
        my $feedonly=yesno($params{feedonly});
 
        # Backwards compatibility
-       if (defined $params{show} && $params{show} =~ m/^\d+$/) {
+       if (defined $params{show} && $params{show} =~ m/^-?\d+$/) {
                $params{limit} = $params{show};
                delete $params{show};
        }
@@ -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) {