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>master
parent
03ee1c15fa
commit
f2b248cdfd
|
@ -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>]]";
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue