score:2

Accepted answer

this is happening because rails 3 escapes all view strings by default, whereas rails 2 left them raw by default.

the trick here is to get that formatter line rendered raw:

<%= raw("options.tooltip.formatter = function() {return 'this is text and this is <b>bold</b>!'; }") %>

in the standard rails idiom:

<%= raw "options.tooltip.formatter = function() {return 'this is text and this is <b>bold</b>!'; }" %>

more good info on rails html escape practices here:

https://stackoverflow.com/a/3906207/1195261


Related Query

More Query from same tag