diff options
author | Frédéric Buclin <LpSolit@gmail.com> | 2015-03-15 13:50:28 +0100 |
---|---|---|
committer | Frédéric Buclin <LpSolit@gmail.com> | 2015-03-15 13:50:28 +0100 |
commit | 2ccf81dec1fbe4e215ea47700a4e006420318621 (patch) | |
tree | 128e4d699b1018d629caf000b164a3b7f843af46 /Bugzilla/Template.pm | |
parent | 1d96fa1689470945545ac8e0f239357185e832a7 (diff) | |
download | bugzilla-2ccf81dec1fbe4e215ea47700a4e006420318621.tar.gz bugzilla-2ccf81dec1fbe4e215ea47700a4e006420318621.tar.xz |
Bug 902395: Enforce utf8 = true for all installations and remove the utf8 parameter
r=dkl a=sgreen
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 
 |