aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki.pm
diff options
context:
space:
mode:
authorSimon McVittie <smcv@debian.org>2018-03-21 08:58:19 +0000
committerSimon McVittie <smcv@debian.org>2018-03-21 09:33:04 +0000
commitf2b248cdfd2515dbc8556e26442da6a0ac08e911 (patch)
treea79732631dd87d24bf7c460e7d87970ba2ac1853 /IkiWiki.pm
parent03ee1c15fab6c734d0ce9e9e364f7e7ebea6774d (diff)
downloadikiwiki-f2b248cdfd2515dbc8556e26442da6a0ac08e911.tar
ikiwiki-f2b248cdfd2515dbc8556e26442da6a0ac08e911.tar.gz
preprocess: Don't encode digit zero as an entity in errors
I'm not sure what happened here, but it seems to have been the wrong thing. Whitelist what we want to *not* encode instead. Signed-off-by: Simon McVittie <smcv@debian.org>
Diffstat (limited to 'IkiWiki.pm')
-rw-r--r--IkiWiki.pm3
1 files changed, 1 insertions, 2 deletions
diff --git a/IkiWiki.pm b/IkiWiki.pm
index 7a38c8f89..90cb96e58 100644
--- a/IkiWiki.pm
+++ b/IkiWiki.pm
@@ -1667,11 +1667,10 @@ sub preprocess ($$$;$$) {
my $error=$@;
chomp $error;
eval q{use HTML::Entities};
- $error = encode_entities($error);
# Also encode most ASCII punctuation
# as entities so that error messages
# are not interpreted as Markdown etc.
- $error = encode_entities($error, '[](){}!#$%*?@^`|~'."\\");
+ $error = encode_entities($error, '^-A-Za-z0-9+_,./:;= '."'");
$ret="[[!$command <span class=\"error\">".
gettext("Error").": $error"."</span>]]";
}