Javascript String jsEscape()
jsEscape()
String.prototype.jsEscape = function() { return this.replace(/'/g, '\\\'').replace(/"/g, '\\"'); };