diff options
Diffstat (limited to 'IkiWiki/Plugin/recentchangesdiff.pm')
-rw-r--r-- | IkiWiki/Plugin/recentchangesdiff.pm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/IkiWiki/Plugin/recentchangesdiff.pm b/IkiWiki/Plugin/recentchangesdiff.pm index 36acef72e..bc793bada 100644 --- a/IkiWiki/Plugin/recentchangesdiff.pm +++ b/IkiWiki/Plugin/recentchangesdiff.pm @@ -4,6 +4,7 @@ package IkiWiki::Plugin::recentchangesdiff; use warnings; use strict; use IkiWiki 2.00; +use HTML::Entities; my $maxlines=200; @@ -39,7 +40,7 @@ sub pagetemplate (@) { #{{{ $diff=join("", @lines); } # escape links and preprocessor stuff - $diff =~ s/(?<!\\)\[\[/\\\[\[/g; + $diff = encode_entities($diff, '\[\]'); $template->param(diff => $diff); } } |