Here you can find the source of decodeHtmlEntity()
String.prototype.decodeHtmlEntity = function(){ var ta = document.createElement('textarea'); ta.innerHTML = this;/*ww w .ja v a 2 s.c o m*/ return ta.value; };
function htmlDecode(value) if(value) return $("<div />").html(value).text(); else return ''; ...
String.prototype.htmlDecode = function() { return this.replace(/\&\;/g, '\&').replace(/\>\;/g, '\>').replace( /\<\;/g, '\<').replace(/\"\;/g, '\'').replace(/\&\#39\;/g, '\''); };
String.prototype.htmlDecode = function () { var div = document.createElement('div'); div.innerHTML = this; return div.innerText || div.textContent; };
String.prototype.decodeHtml = function () { var string = new String(this); string = string.replace(/</g, "<"); string = string.replace(/>/g, ">"); string = string.replace(/"/g, "\"") string = string.replace(/&39;/g, "'"); string = string.replace(/&/g, "&"); return string