summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2007-11-29 02:39:29 +0100
committerlpsolit%gmail.com <>2007-11-29 02:39:29 +0100
commitab73b625a7fb071794cd1152de3c8486d91788f6 (patch)
tree09dfa98b939afb0218cddcec34ed40efe217a1ac
parent38266465177b003d4ec711ac8c2631a8a5fe8c79 (diff)
downloadbugzilla-ab73b625a7fb071794cd1152de3c8486d91788f6.tar.gz
bugzilla-ab73b625a7fb071794cd1152de3c8486d91788f6.tar.xz
Bug 405404: HTML::Scrubber throws "undef error - Wide character in subroutine entry" when a field filtered with html_light contains UTF-8 characters - Patch by Frédéric Buclin <LpSolit@gmail.com> r/a=mkanat
-rw-r--r--Bugzilla/Util.pm9
1 files changed, 1 insertions, 8 deletions
diff --git a/Bugzilla/Util.pm b/Bugzilla/Util.pm
index 144fb87c1..40065c5c9 100644
--- a/Bugzilla/Util.pm
+++ b/Bugzilla/Util.pm
@@ -107,8 +107,7 @@ sub html_light_quote {
require HTML::Parser;
};
- # We need utf8_mode() from HTML::Parser 3.40.
- if ($@ || $HTML::Parser::VERSION < 3.40) { # Package(s) not installed.
+ if ($@) { # Package(s) not installed.
my $safe = join('|', @allow);
my $chr = chr(1);
@@ -172,12 +171,6 @@ sub html_light_quote {
comment => 0,
process => 0);
- # Avoid filling the web server error log.
- # In HTML::Scrubber 0.08, the HTML::Parser object is stored in
- # the "_p" key, but this may change in future versions.
- if (ref($scrubber->{_p}) eq 'HTML::Parser') {
- $scrubber->{_p}->utf8_mode(1);
- }
return $scrubber->scrub($text);
}
}