You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Richard Clarke <ri...@likewhoa.com> on 2002/04/28 22:50:31 UTC
escape the '+' character
Can someone tell me why the Apache::UTIL escape_uri() function doesnt escape the '+' character.
I need to pass a base64 string as a query string but I can't do this unless + is changed to %2B.
Should I just translate it manually...are there any other chars I should be translating manually?
Yours,
Ric
Re: escape the '+' character
Posted by Per Einar Ellefsen <pe...@skynet.be>.
At 22:50 28.04.2002, Richard Clarke wrote:
>Can someone tell me why the Apache::UTIL escape_uri() function doesnt
>escape the '+' character.
>I need to pass a base64 string as a query string but I can't do this
>unless + is changed to %2B.
>Should I just translate it manually...are there any other chars I should
>be translating manually?
If Apache::Util doesn't do it, it's because the corresponding Apache API
function doesn't, so it'll be too buried down to fix. I agree, it looks
like a bug, but the fastest fix is probably to translate it yourself. As
for other characters, I'm not sure.
If Apache::Util doesn't work correctly, you probably want to try
URI::Escape instead, and see if that works for you. While it's in Perl, it
works, and the performance hit shouldn't be too big (there are worse things
that URI-escaping to worry about).
--
Per Einar Ellefsen
per.einar@skynet.be