Unescape HTML String - Node.js String

Node.js examples for String:HTML String

Description

Unescape HTML String

Demo Code


String.prototype.unescapeHTML = function() {
  return String(this).replace("&amp;", "&").replace("&lt;", "<").replace("&gt;", ">").replace('&quot;', '"').replace('&#39;', "'").replace('&#x2F;', "/");
};

Related Tutorials