From 679854b8bbc65d112071111bbd7f34a6a481fb30 Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Tue, 4 Jun 2013 00:21:24 -0700 Subject: RT 4.0.13 --- rt/share/html/Elements/MakeClicky | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'rt/share/html/Elements/MakeClicky') diff --git a/rt/share/html/Elements/MakeClicky b/rt/share/html/Elements/MakeClicky index 57964f7a9..dabe3bb33 100644 --- a/rt/share/html/Elements/MakeClicky +++ b/rt/share/html/Elements/MakeClicky @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -48,20 +48,27 @@ <%ONCE> use Regexp::Common qw(URI); +my $escaper = sub { + my $content = shift; + RT::Interface::Web::EscapeUTF8( \$content ); + return $content; +}; + my %actions = ( default => sub { my %args = @_; - return $args{value}; + return $escaper->($args{value}); }, url => sub { my %args = @_; + $args{value} = $escaper->($args{value}); my $result = qq{[}. loc('Open URL') .qq{]}; return $args{value} . qq{ $result}; }, url_overwrite => sub { my %args = @_; - my $result = qq{}; - $result .= qq{$args{'value'}}; + $args{value} = $escaper->($args{value}); + my $result = qq{$args{value}}; return qq{$result}; }, ); @@ -89,12 +96,6 @@ my $handle = sub { } }; -my $escaper = sub { - my $content = shift; - RT::Interface::Web::EscapeUTF8( \$content ); - return $content; -}; - # Hook to add more Clicky types # XXX Have to have Page argument, as Mason gets caller wrong in Callback? # This happens as we are in <%ONCE> block -- cgit v1.2.1