修复导出时存在 html 标签的 bug

This commit is contained in:
fofolee
2022-04-16 10:18:14 +08:00
parent 3a7085ac31
commit 6a2254f68f
2 changed files with 18 additions and 6 deletions

View File

@@ -418,6 +418,10 @@ window.htmlEncode = (value) => {
return String(value).replace(/&/g, "&amp;").replace(/>/g, "&gt;").replace(/</g, "&lt;").replace(/"/g, "&quot;")
}
window.removeHtmlTags = value => {
return quickcommand.htmlParse(value).querySelector('body').innerText
}
window.hexEncode = text => Buffer.from(text, 'utf8').toString('hex')
window.hexDecode = text => Buffer.from(text, 'hex').toString('utf8')
window.base64Decode = text => Buffer.from(text, 'base64').toString('utf8')