Here you can find the source of escapeHTML()
/**/* ww w. java 2 s.c om*/ * Javascript String escapeHTML function add * @return String */ String.prototype.escapeHTML = function() { return this.replace(/</g,'<').replace(/>/g, '>'); };
String.prototype.escapeHTML = function() { return this. replace(/&/g, "&"). replace(/</g, "<"). replace(/>/g, ">"). replace(/\"/g, """); }; console.log("<&>".escapeHTML());
String.prototype.escapeHTML = function(){ var str = this.replace(/</g, '<'); return str.replace(/>/g, '>'); };
String.prototype.escapeHTML = function() var m = {"&": "&", "<": "<", ">": ">", '"': '"', "'": ''', "/": '/'}; return String(this).replace(/[&<>"'\/]/g, function(s) return m[s]; });
String.prototype.escapeHTML = function () { return(this.replace(/&/g,'&').replace(/>/g,'>').replace(/</g,'<').replace(/"/g,'"')); };
var __entityMap = { "&": "&", "<": "<", ">": ">", '"': '"', "'": ''', "/": '/' }; String.prototype.escapeHTML = function() { ...
String.prototype.escapeHTML = function() { return this.replace(/&/g,'&').replace(/</g,'<').replace(/>/g,'>'); };
var __entityMap = { "&": "&", "<": "<", ">": ">", '"': '"', "'": ''', "/": '/' }; String.prototype.escapeHTML = function() { ...
String.prototype.escapeHTML = function () { return ('' + this).replace(/&/g, '&').replace(/</g, '<').replace(/"/g, '"'); };
String.prototype.escapeHtml = function() { return this .replace(/&/g, '&') .replace(/"/g, '"') .replace(/'/g, ''') .replace(/</g, '<') .replace(/>/g, '>'); };