Decode HTML using JavaScript

This should only be done with trusted input:

const decodeHtml = html => {
  const t = document.createElement('textarea');
  t.innerHTML = html;
  return t.value;
}

This is taken from a Stack Overflow answer.

Leave a Reply

Your email address will not be published.

Color scheme: