const texto = `<strong>Teste</strong> & > <img src="teste.jpg" onload="alert('ataque XSS');" onerror="alert('ataque XSS');">
😀 😄 😍 💗
`;💗`;
const parsed = new DOMParser().parseFromString(texto, "text/html");
console.log(parsed.body.textContent);
Augusto Vasques
- 18,8mil
- 10
- 31
- 62