function removeHTML(str) {
  const doc = new window.DOMParser().parseFromString(str, 'text/html');
  return (doc.body.textContent || '').trim();
}
Removes HTML tags from string e.g. <div>Hello World</div> => Hello World
@param {string} str - The string to remove HTML tags from.
@returns {string} - The string without HTML tags.