Navigation Menu

Skip to content

Commit

Permalink
Merge branch 'hotfix/2012090201'
Browse files Browse the repository at this point in the history
  • Loading branch information
delphinus35 committed Sep 2, 2012
2 parents 666910b + 4f6c20a commit 3d384c1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions t/01_validate.t
Expand Up @@ -4,6 +4,7 @@ use warnings;
use Test::More;
use Test::Requires 'Test::WWW::Mechanize::PSGI';

use Encode;
use Plack::Middleware::Lint;
use Text::Xslate;

Expand Down Expand Up @@ -106,7 +107,8 @@ TT
}

if ($c->form->has_error) {
return $c->render('error', +{action => $c->req->param('action')});
my $action = $c->req->param('action') || '';
return $c->render('error', +{action => $action});
}
return $c->render('index');
} #}}}
Expand Down Expand Up @@ -215,7 +217,8 @@ sub query_string {
my %param = ref $_[0] ? %{$_[0]} : @_;
my $str = '';
while (my ($k, $v) = each %param) {
$v =~ s/(\W)/'%' . unpack('H2', $1)/eg;
$v = encode(utf8 => $v);
$v =~ s/([^a-zA-Z0-9_.!~*'()-])/'%' . unpack('H2', $1)/eg;
$str .= "&$k=$v";
}
$str =~ s/^&//;
Expand Down

0 comments on commit 3d384c1

Please sign in to comment.