Forum: Ruby on Rails array parameter unescaping in Rails 1.2.3

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.
(Guest)
on 2007-06-01 21:49
(Received via mailing list)
Has anyone observed strange results with specialized form construction
that yields array parameters in Rails? Specifically, I'm having an
issue where values aren't being properly unescaped:

... author_fields.text_field :email, :name => "authors[][email]" ...

=> PARAMETERS: "authors"=>[{"email"=> "test%40email.com"},...]

If there are two objects in the array then that %40 becomes a %2540,
ie twice escaped.  In order to work around this I've written a before
filter which grabs array parameters and escapes each item n times,
where n is the length of the array.  Scary.  I want to see if I can
trace this problem to Rails source, but I wanted to do a quick survey
and make sure I'm not making a stupid mistake, or whether this problem
hadn't been fixed already.  Cursory Google searching suggests
neither.  Thanks,

Floyd
This topic is locked and can not be replied to.