All works fine if you were already decoding manually. If you rely on double encoded...
[catagits/Catalyst-Runtime.git] / t / lib / TestApp / Controller / Action / Chained.pm
index c3c85fe..051961c 100644 (file)
@@ -3,6 +3,8 @@ package TestApp::Controller::Action::Chained;
 use strict;
 use warnings;
 
+use HTML::Entities;
+
 use base qw/Catalyst::Controller/;
 
 sub begin :Private { }
@@ -196,6 +198,11 @@ sub star_search : Chained('view') PathPart('search') Args(0) { }
 sub doc_star : Chained('/') PathPart('chained/doc') Args(1) {}
 
 sub return_arg : Chained('/') PathPart('chained/return_arg') Args(1) {}
+sub return_arg_decoded : Chained('/') PathPart('chained/return_arg_decoded') Args(1) {
+    my ($self, $c) = @_;
+    $c->req->args([ map { decode_entities($_) } @{ $c->req->args }]);
+}
+
 
 sub end :Private {
   my ($self, $c) = @_;