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