summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin
diff options
context:
space:
mode:
Diffstat (limited to 'IkiWiki/Plugin')
-rw-r--r--IkiWiki/Plugin/recentchanges.pm4
-rw-r--r--IkiWiki/Plugin/recentchangesdiff.pm2
2 files changed, 5 insertions, 1 deletions
diff --git a/IkiWiki/Plugin/recentchanges.pm b/IkiWiki/Plugin/recentchanges.pm
index 39a123ccf..4d7023c1c 100644
--- a/IkiWiki/Plugin/recentchanges.pm
+++ b/IkiWiki/Plugin/recentchanges.pm
@@ -160,10 +160,12 @@ sub store ($$$) { #{{{
);
}
- # escape wikilinks and preprocessor stuff in commit messages
if (ref $change->{message}) {
foreach my $field (@{$change->{message}}) {
if (exists $field->{line}) {
+ # escape html
+ $field->{line} = encode_entities($field->{line});
+ # escape links and preprocessor stuff
$field->{line} = encode_entities($field->{line}, '\[\]');
}
}
diff --git a/IkiWiki/Plugin/recentchangesdiff.pm b/IkiWiki/Plugin/recentchangesdiff.pm
index bc793bada..08cec3f5a 100644
--- a/IkiWiki/Plugin/recentchangesdiff.pm
+++ b/IkiWiki/Plugin/recentchangesdiff.pm
@@ -39,6 +39,8 @@ sub pagetemplate (@) { #{{{
else {
$diff=join("", @lines);
}
+ # escape html
+ $diff = encode_entities($diff);
# escape links and preprocessor stuff
$diff = encode_entities($diff, '\[\]');
$template->param(diff => $diff);