Tutorial Unescape HTML in JS
by Unknown in javascript , Tutorial 0
function htmlDecode(input){
var e = document.createElement('div');
e.innerHTML = input;
return e.childNodes.length === 0 ? "" : e.childNodes[0].nodeValue;
}
Usage
htmlDecode("<img src='myimage.jpg'>");
// returns "<img src='myimage.jpg'>"