Commit 193c5ac6 authored by myk%mozilla.org's avatar myk%mozilla.org

Partial fix for bug 120030: adds template filter for obscuring email addresses.

Patch by Stephen Lee <slee@@wilcoxassoc.com>. r=myk,a=myk
parent 393dfb83
......@@ -244,6 +244,14 @@ sub create {
# Format a time for display (more info in Bugzilla::Util)
time => \&Bugzilla::Util::format_time,
# Simple filter to obscure the '@' in user visible strings
# See bug 120030 for details
obscure_email => sub {
my ($var) = @_;
$var =~ s/\@/\&#64;/g;
return $var;
},
},
PLUGIN_BASE => 'Bugzilla::Template::Plugin',
......
......@@ -1057,6 +1057,7 @@ END
bug_link => [ sub { return sub { return $_; } }, 1],
csv => sub { return $_; },
time => sub { return $_; },
obscure_email => sub { return $_; },
},
}) || die ("Could not create Template Provider: "
. Template::Provider->error() . "\n");
......
......@@ -97,6 +97,7 @@ foreach my $include_path (@include_paths) {
bug_link => [ sub { return sub { return $_; } }, 1] ,
csv => sub { return $_ } ,
time => sub { return $_ } ,
obscure_email => sub { return $_ } ,
},
}
);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment