diff options
Diffstat (limited to 'Bugzilla/Template.pm')
-rw-r--r-- | Bugzilla/Template.pm | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/Bugzilla/Template.pm b/Bugzilla/Template.pm index 1b6b48205..6de927b9a 100644 --- a/Bugzilla/Template.pm +++ b/Bugzilla/Template.pm @@ -752,7 +752,7 @@ sub create { # Initialize templates (f.e. by loading plugins like Hook). PRE_PROCESS => ["global/variables.none.tmpl"], - ENCODING => Bugzilla->params->{'utf8'} ? 'UTF-8' : undef, + ENCODING => 'UTF-8', # Functions for processing text within templates in various ways. # IMPORTANT! When adding a filter here that does not override a @@ -783,15 +783,10 @@ sub create { # Strips out control characters excepting whitespace strip_control_chars => sub { my ($data) = @_; - state $use_utf8 = Bugzilla->params->{'utf8'}; - # Only run for utf8 to avoid issues with other multibyte encodings - # that may be reassigning meaning to ascii characters. - if ($use_utf8) { - $data =~ s/(?![\t\r\n])[[:cntrl:]]//g; - } + $data =~ s/(?![\t\r\n])[[:cntrl:]]//g; return $data; }, - + # HTML collapses newlines in element attributes to a single space, # so form elements which may have whitespace (ie comments) need # to be encoded using 
 |