]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/recentchangesdiff.pm
smcvpostcomment: reduce length of subject field
[git.ikiwiki.info.git] / IkiWiki / Plugin / recentchangesdiff.pm
index 36acef72ebccf8978c3c4e8348074ef4bca0565c..08cec3f5a2f0a526482cca2e5d3e5c04b72d75ee 100644 (file)
@@ -4,6 +4,7 @@ package IkiWiki::Plugin::recentchangesdiff;
 use warnings;
 use strict;
 use IkiWiki 2.00;
 use warnings;
 use strict;
 use IkiWiki 2.00;
+use HTML::Entities;
 
 my $maxlines=200;
 
 
 my $maxlines=200;
 
@@ -38,8 +39,10 @@ sub pagetemplate (@) { #{{{
                        else {
                                $diff=join("", @lines);
                        }
                        else {
                                $diff=join("", @lines);
                        }
+                       # escape html
+                       $diff = encode_entities($diff);
                        # escape links and preprocessor stuff
                        # escape links and preprocessor stuff
-                       $diff =~ s/(?<!\\)\[\[/\\\[\[/g;
+                       $diff = encode_entities($diff, '\[\]');
                        $template->param(diff => $diff);
                }
        }
                        $template->param(diff => $diff);
                }
        }