JSFiddle - React, Tailwind, and code Playground

HTML

<script src="https://getfirebug.com/firebug-lite-debug.js"></script>

JavaScript

var entityMap = { // Lista de entidades
    '&amp;': '&',
    '&lt;': '<',
    '&gt;': '>',
    '&quot': '"',
    '&#39;': "'",
    '&#x2F;': '/'
  };

function unescapeHtml(str) {
  return String(str).replace(/&amp;|&lt;|&gt;|&quot|&#39;|&#x2F;/g, function (s) {
    return entityMap[s];
  });
}

var uh = unescapeHtml("&lt;div&gt;oi&lt;&#x2F;div&gt;");
console.log(uh);