Rails encoded url query plus sign not properly decoded -
raw email
abc+2@gmail.com
for haml file, have javascripts this
$('#search_email').on('click', function(e){ var val = encodeuricomponent($('#search_email').val()); window.location.search = 'email='+val; });
in query url, shows correctly as
url?email=abc%2b2%40gmail.com
however, controller, when use debugger monitor, shows only
params[:email] = "abc 2@gmail.com"
does know happens, why rails decodes directly , in wrong way. thanks.
Comments
Post a Comment