X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/2b569f99d9e7f1d4d30c7f3adde9729ff4d868cf..a2a63a096b85db5a6e6d241ba93b19a6f2d4a60a:/IkiWiki/Plugin/recentchanges.pm?ds=inline diff --git a/IkiWiki/Plugin/recentchanges.pm b/IkiWiki/Plugin/recentchanges.pm index a73ff37b9..4d7023c1c 100644 --- a/IkiWiki/Plugin/recentchanges.pm +++ b/IkiWiki/Plugin/recentchanges.pm @@ -5,6 +5,7 @@ use warnings; use strict; use IkiWiki 2.00; use Encode; +use HTML::Entities; sub import { #{{{ hook(type => "getsetup", id => "recentchanges", call => \&getsetup); @@ -131,7 +132,7 @@ sub store ($$$) { #{{{ do => "recentchanges_link", page => $_->{page} ). - "\">". + "\" rel=\"nofollow\">". pagetitle($_->{page}). "" } @@ -159,11 +160,13 @@ sub store ($$$) { #{{{ ); } - # escape wikilinks and preprocessor stuff in commit messages if (ref $change->{message}) { foreach my $field (@{$change->{message}}) { if (exists $field->{line}) { - $field->{line} =~ s/(?{line} = encode_entities($field->{line}); + # escape links and preprocessor stuff + $field->{line} = encode_entities($field->{line}, '\[\]'); } } }