JavaScript转义字符还原本页总览转义字符还原转义字符还原 使用原生方法,将被转义的html数据还原成string const htmlToString = (htmlString:string) => { let divDom = document.createElement('div'); divDom.innerHTML = htmlString; return divDom.innerText || divDom.textContent;}