Encode safe string for JavaScript

Encode safe string for JavaScript

Code for a convenient way to encode a string safe for javascript i.e. properly escaped


 <  here's the code  /> 

Feel like I missed something out? Click Here to Comment