Topic: How to remove utf8 in the params

HiI have the following url switcher

 <%= form_tag new_student_session_path,:method=>:get, :class=> 'locale' do %>
      <%= select_tag 'locale', 
        options_for_select([
  [t("English"),"en-US"], 
  [t("Simplified_Chinese"),"zh-CN"], 
  [t("Traditional_Chinese"),"zh-TW"], 
  ],:selected => params[:locale]
  ),:onchange=>'this.form.submit()' %>
      <%= submit_tag 'submit' %>
      <%= javascript_tag "$('.locale input').hide()" %>
    <% end %>

It works but when it click it the URL produced looks like this:

http://localhost:3000/sign_in?utf8=%E2%9C%93&locale=en-US

Why is there a utf=tick and how to remove it?

Last edited by limgw (2012-07-03 07:09:36)

Re: How to remove utf8 in the params

Greater community please correct me if I am wrong, but I beleive the utf8 string is automatically created for form_for and is a hidden input. The purpose is to prevent a certain type of security threat, cross-site-scripting I believe. I don't know why you would need to get rid of it, but if you did I assume you need to look for an option in the config file to turn that off.

Re: How to remove utf8 in the params

wow its really great news and doing all the thing Click here for more detail....

Re: How to remove utf8 in the params

it's called Snowman, even google use it. if you want UTF8 support then u want it there