aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin/recentchanges.pm
diff options
context:
space:
mode:
authorJoey Hess <joey@kodama.kitenet.net>2008-11-18 02:43:17 -0500
committerJoey Hess <joey@kodama.kitenet.net>2008-11-18 02:43:17 -0500
commit15269fed646bf14692061e634969c98b614daaad (patch)
tree25517c9ef16f3ab3153d405df5971b0515359add /IkiWiki/Plugin/recentchanges.pm
parent767bf9c4838277602b75522275c9f08d122f37a1 (diff)
downloadikiwiki-15269fed646bf14692061e634969c98b614daaad.tar
ikiwiki-15269fed646bf14692061e634969c98b614daaad.tar.gz
improve escaping of wikilinks and preprocessor directives
The old method failed for '[' x 3.
Diffstat (limited to 'IkiWiki/Plugin/recentchanges.pm')
-rw-r--r--IkiWiki/Plugin/recentchanges.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/IkiWiki/Plugin/recentchanges.pm b/IkiWiki/Plugin/recentchanges.pm
index 3f70664ac..39a123ccf 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);
@@ -163,7 +164,7 @@ sub store ($$$) { #{{{
if (ref $change->{message}) {
foreach my $field (@{$change->{message}}) {
if (exists $field->{line}) {
- $field->{line} =~ s/(?<!\\)\[\[/\\\[\[/g;
+ $field->{line} = encode_entities($field->{line}, '\[\]');
}
}
}