Escape HTML
const el = document.createElement('div')
const txt = document.createElement('textarea')
txt.innerHTML = '× © <script>alert("bang!")<\/script>'
el.innerText = txt.innerText
document.body.appendChild(el)
const theHtml = document.createElement('div')
theHtml.innerText = txt.innerHTML
document.body.appendChild(theHtml)
Just a hack to escape html strings… guessing most would use a lib for this…