Make the annoying potential XSS warning invisible
This commit is contained in:
parent
97d0d25600
commit
2c39b8697e
|
@ -667,7 +667,7 @@ document.addEventListener("DOMContentLoaded", async function () {
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(htmlNote)
|
console.log(htmlNote)
|
||||||
let cleanedHTML = htmlNote.replace(/<(?!\/?(h1|h2|br|img|blockquote|ol|li|b|i|u|strike|p|pre|ul|hr|a)\b)[^>]*>/gi, '(potential XSS tag was here)')
|
let cleanedHTML = htmlNote.replace(/<(?!\/?(h1|h2|br|img|blockquote|ol|li|b|i|u|strike|p|pre|ul|hr|a)\b)[^>]*>/gi, '')
|
||||||
noteBox.innerHTML = cleanedHTML.replaceAll("\n", "<br>")
|
noteBox.innerHTML = cleanedHTML.replaceAll("\n", "<br>")
|
||||||
|
|
||||||
updateWordCount()
|
updateWordCount()
|
||||||
|
|
Reference in New Issue