[Rt-commit] r19026 - in rt/3.999/trunk: lib/RT/Interface
ruz at bestpractical.com
ruz at bestpractical.com
Thu Apr 2 06:22:08 EDT 2009
Author: ruz
Date: Thu Apr 2 06:22:08 2009
New Revision: 19026
Modified:
rt/3.999/trunk/lib/RT/Interface/Web.pm
rt/3.999/trunk/share/html/Elements/MakeClicky
Log:
* switch to jifty's escapers
Modified: rt/3.999/trunk/lib/RT/Interface/Web.pm
==============================================================================
--- rt/3.999/trunk/lib/RT/Interface/Web.pm (original)
+++ rt/3.999/trunk/lib/RT/Interface/Web.pm Thu Apr 2 06:22:08 2009
@@ -65,47 +65,8 @@
use RT::SavedSearches;
use URI qw();
use Digest::MD5 ();
-
-
-=head2 escape_utf8 SCALARREF
-
-does a css-busting but minimalist escaping of whatever html you're passing in.
-
-=cut
-
-sub escape_utf8 {
- my $ref = shift;
- return unless defined $$ref;
-
- $$ref =~ s/&/&/g;
- $$ref =~ s/</</g;
- $$ref =~ s/>/>/g;
- $$ref =~ s/\(/(/g;
- $$ref =~ s/\)/)/g;
- $$ref =~ s/"/"/g;
- $$ref =~ s/'/'/g;
-}
-
-
-
-=head2 escape_uri SCALARREF
-
-Escapes URI component according to RFC2396
-
-=cut
-
use Encode qw();
-sub escape_uri {
- my $ref = shift;
- return unless defined $$ref;
-
- use bytes;
- $$ref =~ s/([^a-zA-Z0-9_.!~*'()-])/uc sprintf("%%%02X", ord($1))/eg;
-}
-
-
-
=head2 web_canonicalize_info();
Different web servers set different environmental varibles. This
@@ -242,7 +203,7 @@
return '' if not $html and $content =~ /^\s*(--)?\s*\Q$sig\E\s*$/;
# Check for html-formatted sig
- RT::Interface::Web::escape_utf8( \$sig );
+ Jifty::View::Mason::Handler::escape_utf8( \$sig );
return ''
if $html
and $content =~
@@ -317,7 +278,7 @@
return '' if not $html and $content =~ /^\s*(--)?\s*\Q$sig\E\s*$/;
# Check for html-formatted sig
- RT::Interface::Web::escape_utf8( \$sig );
+ Jifty::View::Mason::Handler::escape_utf8( \$sig );
return ''
if $html
and $content =~
Modified: rt/3.999/trunk/share/html/Elements/MakeClicky
==============================================================================
--- rt/3.999/trunk/share/html/Elements/MakeClicky (original)
+++ rt/3.999/trunk/share/html/Elements/MakeClicky Thu Apr 2 06:22:08 2009
@@ -90,7 +90,7 @@
my $escaper = sub {
my $content = shift;
- RT::Interface::Web::escape_utf8( \$content );
+ Jifty::View::Mason::Handler::escape_utf8( \$content );
return $content;
};
@@ -130,7 +130,7 @@
<%INIT>
return unless defined $$content;
unless ( $regexp ) {
- RT::Interface::Web::escape_utf8( $content ) unless $html;
+ Jifty::View::Mason::Handler::escape_utf8( $content ) unless $html;
return;
}
More information about the Rt-commit
mailing list