[Catalyst-commits] r6253 - trunk/Catalyst-Runtime/lib/Catalyst

andyg at dev.catalyst.perl.org andyg at dev.catalyst.perl.org
Tue Apr 3 01:30:59 GMT 2007


Author: andyg
Date: 2007-04-03 01:30:58 +0100 (Tue, 03 Apr 2007)
New Revision: 6253

Modified:
   trunk/Catalyst-Runtime/lib/Catalyst/Engine.pm
Log:
Use regex for unescaping instead of URI::Escape

Modified: trunk/Catalyst-Runtime/lib/Catalyst/Engine.pm
===================================================================
--- trunk/Catalyst-Runtime/lib/Catalyst/Engine.pm	2007-04-02 01:41:50 UTC (rev 6252)
+++ trunk/Catalyst-Runtime/lib/Catalyst/Engine.pm	2007-04-03 00:30:58 UTC (rev 6253)
@@ -7,7 +7,6 @@
 use HTML::Entities;
 use HTTP::Body;
 use HTTP::Headers;
-use URI::Escape ();
 use URI::QueryParam;
 use Scalar::Util ();
 
@@ -641,12 +640,12 @@
 =cut
 
 sub unescape_uri {
-    my $self = shift;
+    my ( $self, $str ) = @_;
     
-    my $e = URI::Escape::uri_unescape(@_);
-    $e =~ s/\+/ /g;
+    $str =~ s/%([0-9A-Fa-f]{2})/chr(hex($1))/eg;
+    $str =~ s/\+/ /g;
     
-    return $e;
+    return $str;
 }
 
 =head2 $self->finalize_output




More information about the Catalyst-commits mailing list