summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Template.pm
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2009-07-16 03:30:48 +0200
committerlpsolit%gmail.com <>2009-07-16 03:30:48 +0200
commitb3f8306d6efb33e6a73d45a2e04d4679cbc17660 (patch)
treee6675a8c7aeff8fe97f4cc5ffdfcbe283c65f20e /Bugzilla/Template.pm
parent8a3a795c12e95481e7dd7b169495ecb5154d120b (diff)
downloadbugzilla-b3f8306d6efb33e6a73d45a2e04d4679cbc17660.tar.gz
bugzilla-b3f8306d6efb33e6a73d45a2e04d4679cbc17660.tar.xz
Bug 476305: Clean up and merge HTML filtering code - Patch by Vitaly Fedrushkov <vitaly.fedrushkov@gmail.com> r/a=LpSolit
Diffstat (limited to 'Bugzilla/Template.pm')
-rw-r--r--Bugzilla/Template.pm34
1 files changed, 1 insertions, 33 deletions
diff --git a/Bugzilla/Template.pm b/Bugzilla/Template.pm
index 48cd90508..d7ebfc055 100644
--- a/Bugzilla/Template.pm
+++ b/Bugzilla/Template.pm
@@ -641,39 +641,7 @@ sub create {
1
],
- # Bug 120030: Override html filter to obscure the '@' in user
- # visible strings.
- # Bug 319331: Handle BiDi disruptions.
- html => sub {
- my ($var) = Template::Filters::html_filter(@_);
- # Obscure '@'.
- $var =~ s/\@/\&#64;/g;
- if (Bugzilla->params->{'utf8'}) {
- # Remove the following characters because they're
- # influencing BiDi:
- # --------------------------------------------------------
- # |Code |Name |UTF-8 representation|
- # |------|--------------------------|--------------------|
- # |U+202a|Left-To-Right Embedding |0xe2 0x80 0xaa |
- # |U+202b|Right-To-Left Embedding |0xe2 0x80 0xab |
- # |U+202c|Pop Directional Formatting|0xe2 0x80 0xac |
- # |U+202d|Left-To-Right Override |0xe2 0x80 0xad |
- # |U+202e|Right-To-Left Override |0xe2 0x80 0xae |
- # --------------------------------------------------------
- #
- # The following are characters influencing BiDi, too, but
- # they can be spared from filtering because they don't
- # influence more than one character right or left:
- # --------------------------------------------------------
- # |Code |Name |UTF-8 representation|
- # |------|--------------------------|--------------------|
- # |U+200e|Left-To-Right Mark |0xe2 0x80 0x8e |
- # |U+200f|Right-To-Left Mark |0xe2 0x80 0x8f |
- # --------------------------------------------------------
- $var =~ s/[\x{202a}-\x{202e}]//g;
- }
- return $var;
- },
+ html => \&Bugzilla::Util::html_quote,
html_light => \&Bugzilla::Util::html_light_quote,