# Array parameter unescaping in Rails 1.2.3

**URL:** <https://www.ruby-forum.com/t/array-parameter-unescaping-in-rails-1-2-3/105723>\
**Category:** Rails\
**Created:** [June 1, 2007, 7:49pm UTC](https://www.ruby-forum.com/t/array-parameter-unescaping-in-rails-1-2-3/105723 "2007-06-01T19:49:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [June 1, 2007, 7:49pm UTC](https://www.ruby-forum.com/t/array-parameter-unescaping-in-rails-1-2-3/105723/1 "2007-06-01T19:49:46Z")

</div>

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](http://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
