Added feature to open links in new tab
This commit is contained in:
parent
e68489717a
commit
fba92592aa
@ -1803,7 +1803,7 @@
|
||||
if (contentArea.textContent.trim() === '') {
|
||||
contentCard.querySelector('.submit-entry').classList.add('hide-completely')
|
||||
} else {
|
||||
const cleanHTML = DOMPurify.sanitize(contentArea.innerHTML.split('\n').map(v => v.trim()).filter(v => v).join('\n'), { FORBID_ATTR: ['style'] })
|
||||
const cleanHTML = DOMPurify.sanitize(contentArea.innerHTML.split('\n').map(v => v.trim()).filter(v => v).join('\n'), { FORBID_ATTR: ['style'], ADD_ATTR: ['target'] })
|
||||
const hash = Crypto.SHA256(cleanHTML)
|
||||
let previousHash
|
||||
if (!isUniqueEntry) {
|
||||
@ -1836,7 +1836,7 @@
|
||||
contentArea.firstChild.remove()
|
||||
contentArea.prepend(p)
|
||||
}
|
||||
const cleanHTML = DOMPurify.sanitize(contentArea.innerHTML.split('\n').map(v => v.trim()).filter(v => v).join('\n'), { FORBID_ATTR: ['style'] })
|
||||
const cleanHTML = DOMPurify.sanitize(contentArea.innerHTML.split('\n').map(v => v.trim()).filter(v => v).join('\n'), { FORBID_ATTR: ['style'], ADD_ATTR: ['target'] })
|
||||
const hash = Crypto.SHA256(cleanHTML)
|
||||
let previousVersion, previousHash
|
||||
if (!isUniqueEntry) {
|
||||
@ -1994,7 +1994,7 @@
|
||||
selectedContent.delete(contentID)
|
||||
} else {
|
||||
const sectionID = contentCard.closest('.article-section').dataset.sectionId
|
||||
const content = DOMPurify.sanitize(contentCard.querySelector('.content__area').innerHTML.split('\n').map(v => v.trim()).filter(v => v).join('\n'), { FORBID_ATTR: ['style'] })
|
||||
const content = DOMPurify.sanitize(contentCard.querySelector('.content__area').innerHTML.split('\n').map(v => v.trim()).filter(v => v).join('\n'), { FORBID_ATTR: ['style'], ADD_ATTR: ['target'] })
|
||||
.replace(/b>/gi, 'strong>').replace(/i>/gi, 'em>')
|
||||
const contributors = Object.keys(getIterationDetails(contentID).contributors)
|
||||
selectedContent.set(contentID, { content, sectionID, contributors })
|
||||
|
||||
Loading…
Reference in New Issue
Block a user