Forum: Ruby on Rails URL-encoding and decoding on Rails

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Af31e731dc3f44620a7874d9602e5bc8?d=identicon&s=25 Evan (Guest)
on 2009-03-23 09:22
(Received via mailing list)
I have a URL parameter that has special characters on it, so I do URL
encoding as such:

my_url(:email => CGI.escape("someemail+extension@mail.com")

Now, I would expect to call a CGI.unescape(params[:email]) on the
action receiving this parameter, and this is true according to my
functional tests.

But when I tested this on the browser, it failed because, apparently,
I didn't need to do any URL-decoding, and when I did it gave me
"someemail+extension mail.com".

Is there a built-in URL-decoding on the controller side? If so, how is
it that it doesn't work on my functional tests.

I tested this on Safari and Firefox 3 browser, by the way.
This topic is locked and can not be replied to.