I use rails 3. In my index.html.erb and in my index.js.erb, if I have:
<%= "string with unsafe characters' like <" %>
It will be automatically encoded:
string with unsafe characters" like &
just as if I used:
<%=h "string with unsafe characters' like <" %>
How can I stop him? I saved a few short bits of JavaScript that I need to insert into the template without automatically encoding the string?
source share