[Jifty-commit] r3197 - jifty/trunk/lib/Jifty/View/Mason
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Sat May 5 21:51:06 EDT 2007
Author: ruz
Date: Sat May 5 21:51:06 2007
New Revision: 3197
Modified:
jifty/trunk/lib/Jifty/View/Mason/Handler.pm
Log:
escape_utf8
* don't use bytes just escape things doesn't matter if it's
flagged string or not, perl must do the right thing.
* don't localize ref, use it directly, afaik smaller
memory footprint
Modified: jifty/trunk/lib/Jifty/View/Mason/Handler.pm
==============================================================================
--- jifty/trunk/lib/Jifty/View/Mason/Handler.pm (original)
+++ jifty/trunk/lib/Jifty/View/Mason/Handler.pm Sat May 5 21:51:06 2007
@@ -161,18 +161,14 @@
sub escape_utf8 {
my $ref = shift;
- my $val = $$ref;
- use bytes;
no warnings 'uninitialized';
- $val =~ s/&/&/g;
- $val =~ s/</</g;
- $val =~ s/>/>/g;
- $val =~ s/\(/(/g;
- $val =~ s/\)/)/g;
- $val =~ s/"/"/g;
- $val =~ s/'/'/g;
- $$ref = $val;
- Encode::_utf8_on($$ref);
+ $$ref =~ s/&/&/g;
+ $$ref =~ s/</</g;
+ $$ref =~ s/>/>/g;
+ $$ref =~ s/\(/(/g;
+ $$ref =~ s/\)/)/g;
+ $$ref =~ s/"/"/g;
+ $$ref =~ s/'/'/g;
}
More information about the Jifty-commit
mailing list