From 407e1314ed3439e6a2e0585aeb5e4d482caef6e1 Mon Sep 17 00:00:00 2001 From: Byron Jones Date: Wed, 23 Apr 2014 14:26:28 +0800 Subject: Add missing fix from bug 968576 --- Bugzilla/Util.pm | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Bugzilla/Util.pm') diff --git a/Bugzilla/Util.pm b/Bugzilla/Util.pm index a030a92dd..75427af14 100644 --- a/Bugzilla/Util.pm +++ b/Bugzilla/Util.pm @@ -98,6 +98,10 @@ sub html_quote { state $use_utf8 = Bugzilla->params->{'utf8'}; if ($use_utf8) { + # Remove control characters if the encoding is utf8. + # Other multibyte encodings may be using this range; so ignore if not utf8. + $var =~ s/(?![\t\r\n])[[:cntrl:]]//g; + # Remove the following characters because they're # influencing BiDi: # -------------------------------------------------------- -- cgit v1.2.3-24-g4f1b