From: Rafael Kitover Date: Tue, 9 Feb 2010 22:26:23 +0000 (+0000) Subject: update Changes, put comment back in X-Git-Tag: 5.80021~6 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=52e23ad416cd9765e675dcedd7d123f0e9523ca7 update Changes, put comment back in --- diff --git a/Changes b/Changes index 9023525..de9104c 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,8 @@ # This file documents the revision history for Perl extension Catalyst. + Bug fixed: + - uri_for will now escape unsafe chars in captures and encode utf8 chars + 5.80020 2010-02-04 06:51:18 New features: diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm index 4dd08e4..dd44d0f 100644 --- a/lib/Catalyst.pm +++ b/lib/Catalyst.pm @@ -1327,6 +1327,7 @@ sub uri_for { (map { my $param = "$_"; utf8::encode( $param ) if utf8::is_utf8($param); + # using the URI::Escape pattern here so utf8 chars survive $param =~ s/([^A-Za-z0-9\-_.!~*'() ])/$URI::Escape::escapes{$1}/go; $param =~ s/ /+/g; "${key}=$param"; } ( ref $val eq 'ARRAY' ? @$val : $val ));