[Catalyst] Automatically uri_unescape parameters

John Goulah jgoulah at gmail.com
Mon Mar 17 20:50:27 GMT 2008


On Mon, Mar 17, 2008 at 4:05 PM, Jonathan Rockway <jon at jrock.us> wrote:

> * On Mon, Mar 17 2008, Stef T wrote:
> > Hello Alex,
> >    I would assume that if Catalyst-Plugin-HTML-Scrubber-0.01 doesn't
> > do what you want, it will probably point you in the right direction ;)
> >
> >    You could probably also do this using the DBIx inflate_column I
> > dare say.
>
> I don't think this is what he is talking about.  If it is, the module he
> is looking for is URI::Escape.
>
> If he's talking about unescaping the querystring, that should be handled
> by Catalyst and if something is going wrong, a failing test case would
> be appreciated.
>


I think the question is not for the query string but if its passed in the
URI, which is probably really bad form to pass things with spaces and such,
but sometimes you have to deal with legacy code before its fixed the right
way by moving it out to the query string.  Something like this, where $thing
has spaces, needs specific escaping, which is kind of a pain:

 sub bleh : Local {
    my ( $self, $c, $thing ) =3D @_;

    $thing =3D uri_unescape($thing); # this is necessary if it has spaces, =
etc
}


Thanks,
John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20080317/1740c=
f4c/attachment.htm


More information about the Catalyst mailing list