Here you can find the source of stripHTMLEntities()
String.prototype.stripHTMLEntities = function() { var el = document.createElement("div"); var html = this.replace(/<img/g, '<x-img'); el.innerHTML = html;/*from ww w . j a va 2 s . com*/ return el.innerText; }
String.prototype.stripHTML = function(){ return this.replace(/<(?:.|\s)*?>/g, ""); };
String.prototype.stripHTML = function(){ return $('<p/>').html(this.toString()).text();
String.prototype.stripHTML = function(){ var re = new RegExp("(<([^>]+)>)", "ig"); var str = this.replace(re, ""); var amps = [" ", "&", """]; var replaceAmps =[" ", "&", '"']; for(var x=0;x<amps.length;x++){ str = str.replace(amps[x], replaceAmps[x]); re = new RegExp("(&(.*?);)", "ig"); ...
String.prototype.stripHtml = function() { var tmp = document.createElement("DIV"); tmp.innerHTML = this; return tmp.textContent || tmp.innerText || ""; };
String.prototype.stripHtml = function () { var _self = this.replace(/(<([^>]+)>)/ig, ''); return _self;
String.prototype.stripHtml = function() { return this.replace(/<[^>]+>/g, ""); }; console.assert("<p>Shoplifters of the World <em>Unite</em>!</p>".stripHtml() == "Shoplifters of the World Unite!"); console.assert("1 < 2".stripHtml() == "1 < 2");
String.prototype.stripHtml = function () { return this.replace(/<(?:.|\n)*?>/gm, ''); };