diff options
author | mkanat%bugzilla.org <> | 2009-10-24 05:21:06 +0000 |
---|---|---|
committer | mkanat%bugzilla.org <> | 2009-10-24 05:21:06 +0000 |
commit | a2dd3b00284fd4724d3408274cb1156c7a77d187 (patch) | |
tree | 4aa41a1c8cea9d31aaccddc4685f8f1c5991c1b4 /Bugzilla/Util.pm | |
parent | 401fb65f2e6f9031cedf47fb6d951236b5c624d3 (diff) | |
download | bugs-a2dd3b00284fd4724d3408274cb1156c7a77d187.tar bugs-a2dd3b00284fd4724d3408274cb1156c7a77d187.tar.gz bugs-a2dd3b00284fd4724d3408274cb1156c7a77d187.tar.bz2 bugs-a2dd3b00284fd4724d3408274cb1156c7a77d187.tar.xz bugs-a2dd3b00284fd4724d3408274cb1156c7a77d187.zip |
Bug 520948: Use Bugzilla->feature and feature_enabled everywhere instead of checking if modules are installed
Patch by Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=LpSolit
Diffstat (limited to 'Bugzilla/Util.pm')
-rw-r--r-- | Bugzilla/Util.pm | 9 |
1 files changed, 2 insertions, 7 deletions
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)); |