From ab73b625a7fb071794cd1152de3c8486d91788f6 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Thu, 29 Nov 2007 01:39:29 +0000 Subject: [PATCH] =?utf8?q?Bug=20405404:=20HTML::Scrubber=20throws=20"undef?= =?utf8?q?=20error=20-=20Wide=20character=20in=20subroutine=20entry"=20whe?= =?utf8?q?n=20a=20field=20filtered=20with=20html=5Flight=20contains=20UTF-?= =?utf8?q?8=20characters=20-=20Patch=20by=20Fr=C3=83=C2=A9d=C3=83=C2=A9ric?= =?utf8?q?=20Buclin=20=20r/a=3Dmkanat?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- Bugzilla/Util.pm | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/Bugzilla/Util.pm b/Bugzilla/Util.pm index 144fb87c1a..40065c5c98 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); } } -- 2.47.3