From a2dd3b00284fd4724d3408274cb1156c7a77d187 Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" <> Date: Sat, 24 Oct 2009 05:21:06 +0000 Subject: Bug 520948: Use Bugzilla->feature and feature_enabled everywhere instead of checking if modules are installed Patch by Max Kanat-Alexander r=LpSolit, a=LpSolit --- Bugzilla/Util.pm | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'Bugzilla/Util.pm') diff --git a/Bugzilla/Util.pm b/Bugzilla/Util.pm index a36b22c37..513e02857 100644 --- a/Bugzilla/Util.pm +++ b/Bugzilla/Util.pm @@ -124,12 +124,7 @@ sub html_light_quote { dfn samp kbd big small sub sup tt dd dt dl ul li ol fieldset legend); - # Are HTML::Scrubber and HTML::Parser installed? - eval { require HTML::Scrubber; - require HTML::Parser; - }; - - if ($@) { # Package(s) not installed. + if (!Bugzilla->feature('html_desc')) { my $safe = join('|', @allow); my $chr = chr(1); @@ -144,7 +139,7 @@ sub html_light_quote { $text =~ s#$chr($safe)$chr#<$1>#go; return $text; } - else { # Packages installed. + else { # We can be less restrictive. We can accept elements with attributes. push(@allow, qw(a blockquote q span)); -- cgit v1.2.3-24-g4f1b