In Rails, I’d like to be able to escape all my URLs using link_to across the board. What is the best way to do this?
Currently, the permalinks are stored in UTF-8. e.g. it’s stored as: 水-water
I’m running Spree, so I would like to avoid overriding all the template files with CGI.escapes to achieve the same thing.
Other considerations:
- Store the Escaped url in the permalinks column? (params encodes it to UTF-8 and then the sequel can’t find it because it was stored in the DB as escaped)
Thanks in advanced!
Justin
Nevermind, link_to already escapes the UTF-8 properly. It was the browser already interpreting it making me perceive it as unescaped.
Using a Raw HTTP Viewer such as: http://www.rexswain.com/httpview.html
Helped see that.