Little bug in search_behaviour when using UTF-8

To Oliver B.:

I’ve found a little but annoying bug in search_behaviour:
A Rails exception raises when using any UTF-8 character in the
querystring (Ã?, Á, for instance) which it’s especially noticeable
when using the “live search” approach.

This is easily fixed by using “encodeURIComponent” instead of
“escape” (the former is what scriptaculous uses too)
More about this issue here: http://blog.openboxsoftware.com/2006/04/
javascript-escape-vs-encodeuricomponent/

I’ve attached a patch with the fix.



Cheers,

Ruben N.
www.leftbee.net – Personal Blog

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs