X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/27a80dc40aa4cad93576a35d0af1f6c117ffcb68..6b0ac401cdbe3a0e4a6997411542e1e0598ccbe5:/IkiWiki/Plugin/inline.pm?ds=sidebyside diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm index ffdf397f1..159cc5def 100644 --- a/IkiWiki/Plugin/inline.pm +++ b/IkiWiki/Plugin/inline.pm @@ -506,7 +506,7 @@ sub get_inline_content ($$) { if (isinternal($page)) { # make inlined text of internal pages searchable run_hooks(indexhtml => sub { - shift->(page => $page, destpage => $page, + shift->(page => $page, destpage => $destpage, content => $ret); }); } @@ -564,13 +564,15 @@ sub absolute_urls ($$) { next unless $v_offset; # 0 v_offset means no value my $v = substr($text, $v_offset, $v_len); $v =~ s/^([\'\"])(.*)\1$/$2/; - if ($v=~/^#/) { + eval q{use HTML::Entities}; + my $dv = decode_entities($v); + if ($dv=~/^#/) { $v=$baseurl.$v; # anchor } - elsif ($v=~/^(?!\w+:)[^\/]/) { + elsif ($dv=~/^(?!\w+:)[^\/]/) { $v=$url.$v; # relative url } - elsif ($v=~/^\//) { + elsif ($dv=~/^\//) { if (! defined $urltop) { # what is the non path part of the url? my $top_uri = URI->new($url);