Here you can find the source of escapeHTML()
String.prototype.escapeHTML = function() { var m = {"&": "&", "<": "<", ">": ">", '"': '"', "'": ''', "/": '/'}; return String(this).replace(/[&<>"'\/]/g, function(s) {//from ww w .jav a2 s . co m return m[s]; }); }
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 () { 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, '>'); };
String.prototype.escapeHTML = function() { return this.replace(/&/g,'&').replace(/</g,'<').replace(/>/g,'>'); };