Made the ultra strict html filter slightly less ultra-strict so that markdown actually fully works

This commit is contained in:
Tracker-Friendly 2024-07-02 18:36:00 +01:00
parent 95055cc857
commit 818bdf6806
1 changed files with 1 additions and 1 deletions

View File

@ -563,7 +563,7 @@ document.addEventListener("DOMContentLoaded", function() {
let responseData = await response.json() let responseData = await response.json()
let bytes = CryptoJS.AES.decrypt(responseData["content"], password); let bytes = CryptoJS.AES.decrypt(responseData["content"], password);
let cleanedHTML = bytes.toString(CryptoJS.enc.Utf8).replace(/<(?!\/?(h1|h2|br)\b)[^>]*>/gi, '') let cleanedHTML = bytes.toString(CryptoJS.enc.Utf8).replace(/<(?!\/?(h1|h2|br|img|blockquote|ol|li|b|i|u|strike|p|pre|ul|hr|a)\b)[^>]*>/gi, '')
noteBox.innerHTML = cleanedHTML.replace("\n", "<br>") noteBox.innerHTML = cleanedHTML.replace("\n", "<br>")
updateWordCount() updateWordCount()