From 2c39b8697e462ee482feb3c008ed9456199a337f Mon Sep 17 00:00:00 2001 From: Arzumify Date: Wed, 7 Aug 2024 17:58:33 +0100 Subject: [PATCH] Make the annoying potential XSS warning invisible --- static/js/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/js/main.js b/static/js/main.js index 77657d0..841b51e 100644 --- a/static/js/main.js +++ b/static/js/main.js @@ -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", "
") updateWordCount()