Make the annoying potential XSS warning invisible

This commit is contained in:
Tracker-Friendly 2024-08-07 17:58:33 +01:00
parent 97d0d25600
commit 2c39b8697e
1 changed files with 1 additions and 1 deletions

View File

@ -667,7 +667,7 @@ document.addEventListener("DOMContentLoaded", async function () {
}
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>")
updateWordCount()