Fixed issue with newlines not being migrated from the older format

This commit is contained in:
Tracker-Friendly 2024-07-30 10:31:02 +01:00
parent fb6ed88584
commit 428cda40d3
1 changed files with 1 additions and 1 deletions

View File

@ -689,7 +689,7 @@ document.addEventListener("DOMContentLoaded", 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, '(potential XSS tag was here)')
noteBox.innerHTML = cleanedHTML.replace("\n", "<br>") noteBox.innerHTML = cleanedHTML.replaceAll("\n", "<br>")
updateWordCount() updateWordCount()