Can you show us a code example of what you mean? Which code is
translating them to underscores?
For example:
text_field_tag(‘search[Модель авто]’) # => .
I suppose it is because in html4 id attribute"must begin with a letter ([A-Za-z]) and may be followed by any number of letters, digits ([0-9]), hyphens ("-"), underscores ("_"), colons (":"), and periods (".")" (http://www.w3.org/TR/html4/types.html#type-name).
Since html5 we have no restrictions like that: http://www.w3.org/TR/html5/dom.html#the-id-attribute. I want to change behavior of santizer for id attribute. @nashby pointed me on that method: https://github.com/rails/rails/blob/master/actionpack/lib/action_view/helpers/form_tag_helper.rb#L779-782
I don’t see any reason why we can’t change this. I think we can proceed unless someone else have a good reason to not.
I don’t think it’d be necessary, but if we need to change jquery-ujs for this as well, please let me know.
– Steve Schwartz
Yes, we should definitely fix this. Can you work up a patch?
Yes, I will work on it.