if (ref $change->{message}) {
foreach my $field (@{$change->{message}}) {
if (exists $field->{line}) {
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}, '\[\]');
IkiWiki::run_hooks(pagetemplate => sub {
shift->(page => $page, destpage => $page,
template => $template, rev => $change->{rev});
IkiWiki::run_hooks(pagetemplate => sub {
shift->(page => $page, destpage => $page,
template => $template, rev => $change->{rev});