title: HTML Entity to Unicode conversion
body: <p>Is there some way to convert HTML Entities into unicode characters in Javascript?</p>
  
  <p>I tried</p>
  
  <pre><code>var unicodeHtmlEntity = function (t) {
      numericValue = parseInt(t.slice(2, -1), 10);
      numericValue = numericValue.toString(16);
      return "\\u" + numericValue;
  };
  </code></pre>
  
  <p>Where the function can be called like <code>&amp;#8364;</code>, but returns the string <code>\u20ac</code>, not the unicode character for <strong>&#8364;</strong> . Any ideas?</p>