chg: [js-utils:sanitize] Added sanitization function
parent
03b6de68e1
commit
d2003d45d6
|
@ -200,4 +200,10 @@ function download(filename, data, type='application/json') {
|
|||
a.click()
|
||||
document.body.removeChild(a)
|
||||
URL.revokeObjectURL(objectURL)
|
||||
}
|
||||
|
||||
function sanitize(unsafeText) {
|
||||
const decoder = $('<div>')
|
||||
decoder.text(unsafeText)
|
||||
return decoder.html()
|
||||
}
|
Loading…
Reference in New Issue