use strict;
use IkiWiki 2.00;
use Encode;
+use HTML::Entities;
sub import { #{{{
hook(type => "getsetup", id => "recentchanges", call => \&getsetup);
);
}
- # escape wikilinks and preprocessor stuff in commit messages
if (ref $change->{message}) {
foreach my $field (@{$change->{message}}) {
if (exists $field->{line}) {
- $field->{line} =~ s/(?<!\\)\[\[/\\\[\[/g;
+ # escape html
+ $field->{line} = encode_entities($field->{line});
+ # escape links and preprocessor stuff
+ $field->{line} = encode_entities($field->{line}, '\[\]');
}
}
}