-2

I am kind new to rails dev, I saw some guys used escape_javascript when rendering html, but I don't know what exactly the purpose of using it.When should I use it? could anyone provide some detailed example for this? much appreciated

Harikrishnan
  • 9,688
  • 11
  • 84
  • 127
kevin_dev
  • 1
  • 1
  • Please search for this, there are definitive answers out there. Take a look at this: http://stackoverflow.com/questions/1620113/why-escape-javascript-before-rendering-a-partial – Vageesh Bhasin Feb 27 '14 at 13:00

1 Answers1

0

You don't want users posting JavaScript that the browser actually executes?

Severin
  • 8,508
  • 14
  • 68
  • 117