[Jifty-commit] r4657 - in jifty/trunk: lib/Jifty/View/Mason
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Sat Dec 8 23:42:34 EST 2007
Author: jesse
Date: Sat Dec 8 23:42:32 2007
New Revision: 4657
Modified:
jifty/trunk/ (props changed)
jifty/trunk/lib/Jifty/View/Mason/Handler.pm
Log:
r72834 at pinglin: jesse | 2007-12-08 22:38:02 -0500
* Terrifyingly, the added /s causes escape_html (2% of hiveminder's runtime) to benchmark 200% faster.
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 Dec 8 23:42:32 2007
@@ -127,13 +127,13 @@
sub escape_utf8 {
my $ref = shift;
no warnings 'uninitialized';
- $$ref =~ s/&/&/g;
- $$ref =~ s/</</g;
- $$ref =~ s/>/>/g;
- $$ref =~ s/\(/(/g;
- $$ref =~ s/\)/)/g;
- $$ref =~ s/"/"/g;
- $$ref =~ s/'/'/g;
+ $$ref =~ s/&/&/gs;
+ $$ref =~ s/</</gs;
+ $$ref =~ s/>/>/gs;
+ $$ref =~ s/\(/(/gs;
+ $$ref =~ s/\)/)/gs;
+ $$ref =~ s/"/"/gs;
+ $$ref =~ s/'/'/gs;
}
=head2 escape_uri SCALARREF
More information about the Jifty-commit
mailing list