Here you can find the source of escapeQuotes()
String.prototype.escapeQuotes = function() { var m = {"\"": "\\\"", "'": "\\'"}; return String(this.replace("\\", "\\\\")).replace(/["']/g, function(s) {//www.java 2 s . c o m return m[s]; }); }
String.prototype.escapeSpecialChars = function() { return this.replace(/\\n/g, "\\n") .replace(/\\'/g, "\\'") .replace(/\\"/g, '\\"') .replace(/\\&/g, "\\&") .replace(/\\r/g, "\\r") .replace(/\\t/g, "\\t") .replace(/\\b/g, "\\b") .replace(/\\f/g, "\\f"); ...
String.prototype.escapeSpecialChars = function () { return this.replace(/\\n/g, '\\\\n') .replace(/\\'/g, '\\\'') .replace(/\\'/g, '\\\'') .replace(/\\&/g, '\\\&') .replace(/\\r/g, '\\\r') .replace(/\\t/g, '\\\\t') .replace(/\\b/g, '\\\b') .replace(/\\f/g, '\\\f'); ...
String.prototype.escapeCharacters = function(chars) { var foundChar = false; var length = chars.length; for (var i = 0; i < length; ++i) { if (this.indexOf(chars.charAt(i)) !== -1) { foundChar = true; break; if (!foundChar) return this; var result = ""; for (var j = 0; j < this.length; ++j) { if (chars.indexOf(this.charAt(j)) !== -1) result += "\\"; result += this.charAt(j); return result; };
String.prototype.escapeForRegExp = function() { return this.escapeCharacters("^[]{}()\\.$*+?|"); };
String.prototype.escapeOnce = function () { return this.replace(/"/g, '"').replace(/>/g, '>').replace(/</g, '<').replace(/&(?!([a-zA-Z]+|#\d+);)/g, '&'); };
String.prototype.escapeSecure = function () { var returnStr, tmpStr; tmpStr = $(this); tmpStr.find("script").remove(); returnStr = tmpStr.html(); return returnStr; };
String.prototype.escapeSelector = function( find ) find = new RegExp( '([' + (find || '\[\]:') + '])' ); return this.replace(find, '\\$1'); }; Array.prototype.powerSet = function() var i = 1, j = 0, ...
String.prototype.escapeURL = function() { return escape(this)
String.prototype.escaped = function () { return this.replace(/&/gim, "&").replace(/</gim, "<").replace(/>/gim, ">").replace(/"/gim, """).replace(/'/gim, "'");