Passing strings into html and not converting to hex (I think)

Hello all.

I need pass this without it changing the &, and = into %26, and %3D.

<%= @esearch.search q:params[:query]+‘&pretty=true’ do %>

Everything else is working fine, its just passing this ;

GET http://localhost:9200/_search?q=asa%26pretty%3Dtrue

I need this to be;

GET http://localhost:9200/_search?q=asa&pretty=true

Thanks in advance.