diff options
author | David Lawrence <dkl@mozilla.com> | 2014-04-18 18:31:49 +0200 |
---|---|---|
committer | David Lawrence <dkl@mozilla.com> | 2014-04-18 18:31:49 +0200 |
commit | f8e099a25492dfa670fa86dff9842b6794da3387 (patch) | |
tree | 167aa6addf74a87054b4bb8fbb54b2f3681ac808 /Bugzilla | |
parent | b1eaa2612816407dc0ead9106bf3272c777084d5 (diff) | |
parent | b909fa7d401cc1606f2e9c65a5f3e3ee4199e523 (diff) | |
download | bugzilla-f8e099a25492dfa670fa86dff9842b6794da3387.tar.gz bugzilla-f8e099a25492dfa670fa86dff9842b6794da3387.tar.xz |
merged with bugzilla/4.2
Diffstat (limited to 'Bugzilla')
-rw-r--r-- | Bugzilla/Constants.pm | 2 | ||||
-rw-r--r-- | Bugzilla/Template.pm | 11 |
2 files changed, 12 insertions, 1 deletions
diff --git a/Bugzilla/Constants.pm b/Bugzilla/Constants.pm index b7038505a..b8d1a2260 100644 --- a/Bugzilla/Constants.pm +++ b/Bugzilla/Constants.pm @@ -212,7 +212,7 @@ use Memoize; # CONSTANTS # # Bugzilla version -use constant BUGZILLA_VERSION => "4.2.7+"; +use constant BUGZILLA_VERSION => "4.2.8+"; # Location of the remote and local XML files to track new releases. use constant REMOTE_FILE => 'http://updates.bugzilla.org/bugzilla-update.xml'; diff --git a/Bugzilla/Template.pm b/Bugzilla/Template.pm index fdeda165c..b1bea78e5 100644 --- a/Bugzilla/Template.pm +++ b/Bugzilla/Template.pm @@ -671,6 +671,17 @@ sub create { my ($data) = @_; return encode_base64($data); }, + + # Strips out control characters excepting whitespace + strip_control_chars => sub { + my ($data) = @_; + # Only run for utf8 to avoid issues with other multibyte encodings + # that may be reassigning meaning to ascii characters. + if (Bugzilla->params->{'utf8'}) { + $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 |