Made the ultra strict html filter slightly less ultra-strict so that markdown actually fully works
This commit is contained in:
parent
95055cc857
commit
818bdf6806
|
@ -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()
|
||||||
|
|
Reference in New Issue