[Catalyst-commits] r10498 - in Catalyst-Runtime/5.80/trunk: . lib t
lukes at dev.catalyst.perl.org
lukes at dev.catalyst.perl.org
Wed Jun 10 21:20:57 GMT 2009
Author: lukes
Date: 2009-06-10 21:20:57 +0000 (Wed, 10 Jun 2009)
New Revision: 10498
Modified:
Catalyst-Runtime/5.80/trunk/Changes
Catalyst-Runtime/5.80/trunk/lib/Catalyst.pm
Catalyst-Runtime/5.80/trunk/t/unit_core_uri_for.t
Log:
prevent encoding plus signs in uri_for args
Modified: Catalyst-Runtime/5.80/trunk/Changes
===================================================================
--- Catalyst-Runtime/5.80/trunk/Changes 2009-06-10 20:16:25 UTC (rev 10497)
+++ Catalyst-Runtime/5.80/trunk/Changes 2009-06-10 21:20:57 UTC (rev 10498)
@@ -1,5 +1,8 @@
# This file documents the revision history for Perl extension Catalyst.
+ Bug fixes:
+ - Stop encoding plus signs in uri_for args
+
5.80005 2009-06-06 14:40:00
Behaviour changes:
Modified: Catalyst-Runtime/5.80/trunk/lib/Catalyst.pm
===================================================================
--- Catalyst-Runtime/5.80/trunk/lib/Catalyst.pm 2009-06-10 20:16:25 UTC (rev 10497)
+++ Catalyst-Runtime/5.80/trunk/lib/Catalyst.pm 2009-06-10 21:20:57 UTC (rev 10498)
@@ -1192,7 +1192,7 @@
( scalar @args && ref $args[$#args] eq 'HASH' ? pop @args : {} );
carp "uri_for called with undef argument" if grep { ! defined $_ } @args;
- s/([^A-Za-z0-9\-_.!~*'()])/$URI::Escape::escapes{$1}/go for @args;
+ s/([^A-Za-z0-9\-_.!~*'()+])/$URI::Escape::escapes{$1}/go for @args;
unshift(@args, $path);
Modified: Catalyst-Runtime/5.80/trunk/t/unit_core_uri_for.t
===================================================================
--- Catalyst-Runtime/5.80/trunk/t/unit_core_uri_for.t 2009-06-10 20:16:25 UTC (rev 10497)
+++ Catalyst-Runtime/5.80/trunk/t/unit_core_uri_for.t 2009-06-10 21:20:57 UTC (rev 10498)
@@ -1,7 +1,7 @@
use strict;
use warnings;
-use Test::More tests => 16;
+use Test::More tests => 17;
use URI;
use_ok('Catalyst');
@@ -51,6 +51,11 @@
'http://127.0.0.1/foo/yada/bar/wibble%3F/with%20space', 'Space gets encoded'
);
+is(
+ Catalyst::uri_for( $context, '/bar', 'with+plus', { 'also' => 'with+plus' })->as_string,
+ 'http://127.0.0.1/foo/bar/with+plus?also=with%2Bplus',
+ 'Plus is not encoded'
+);
# test with utf-8
is(
More information about the Catalyst-commits
mailing list