export const unescapeHtml = (str: string) =>
  str.replace(
    /&amp;|&lt;|&gt;|&#39;|&quot;|&#8217;/g,
    (tag) =>
      ({
        "&amp;": "&",
        "&lt;": "<",
        "&gt;": ">",
        "&#39;": "'",
        "&quot;": '"',
        "&#8217;": "'",
      })[tag] || tag,
  );
