# Problems with URL encoding

**URL:** <https://www.ruby-forum.com/t/problems-with-url-encoding/133156>\
**Category:** Rails\
**Created:** [March 28, 2008, 11:21am UTC](https://www.ruby-forum.com/t/problems-with-url-encoding/133156 "2008-03-28T11:21:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![makire](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/fbc32d/32.png) [@makire](https://www.ruby-forum.com/u/makire)\
**Post date:** [March 28, 2008, 11:21am UTC](https://www.ruby-forum.com/t/problems-with-url-encoding/133156/1 "2008-03-28T11:21:45Z")

</div>

Hi

I have a problem when sending parameters from link\_to\_remote. My link  
code:

\<%= link\_to\_remote “Remove”,  
:url =\> object\_relation\_path(  
:id =\> 0,  
:object\_relation =\> {  
:parent\_id =\> @product.id,  
:parent\_type =\> “Product”,  
:child\_id =\> content\_object.id,  
:child\_type =\> “ContentObject”,  
:relation\_type\_id =\> 1000  
},  
:format =\> :partial,  
:response\_template =\> “products/#{@product.product\_type}/show/  
partials/related\_content”),  
:update =\> “related\_content\_wrapper”,  
:method =\> :delete %\>

I think this is a correct setting and Firebug shows a correctly  
encoded query string. But what I get is the following:

{“format”=\>“partial”,  
“\_method”=\>“delete”,  
“action”=\>“destroy”,  
“amp;response\_template”=\>“products/game/show/partials/  
related\_content”,  
“amp;object\_relation”=\>  
{“child\_type”=\>“ContentObject”,  
“relation\_type\_id”=\>“1000”,  
“parent\_type”=\>“Product”,  
“child\_id”=\>“102”,  
“parent\_id”=\>“22”},  
“id”=\>“0”,  
“controller”=\>“object\_relations”}

In other words, I get the encoded “amp;” as part of the params hash  
key. Does anyone have any input or solution to this?

Many thanks in advance

Kindest regards

Erik L.
