How to output unescaped string to console ?

Hi, whenever I display a string to the console (for debugging purpose) I get a bunch of \\\\ '' """"

1) It's not human readable and really annoying when strings are very long 2) Sometime it prevents me to debug anything as I really don't know if my quotes or backslashes are ok

I must mention that I'm displaying on the fly generated javascript, so the sense of my demand (could be applied to json generation to)

So, is there an helper method in Rails instead of just issuing p my_script in my controller...

I thought about p unescape_rjs(my_script) but unescape_rjs is a protected method of ActionController::Assertions::SelectorAssertions and such, not available in the controller.

Any idea ?

Note : I could certainly gsub gsub gsub but I'm not sure I would catch all the cases...

BTW, a simple javascript formatter could even be better - I often struggle with RJS when I need to figure out the output render :update