X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/27a80dc40aa4cad93576a35d0af1f6c117ffcb68..4fe1538b4df838f73382ed64648aa7c12c7ef50a:/IkiWiki/Plugin/inline.pm 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);