default link target is _blank and target attr is allowed
This commit is contained in:
@@ -133,7 +133,7 @@ export default {
|
|||||||
new ListItem(),
|
new ListItem(),
|
||||||
new Code(),
|
new Code(),
|
||||||
new History(),
|
new History(),
|
||||||
new Link({ openOnClick: false }),
|
new Link({ openOnClick: false, target: '_blank' }),
|
||||||
new Bold(),
|
new Bold(),
|
||||||
new Italic(),
|
new Italic(),
|
||||||
new Strike(),
|
new Strike(),
|
||||||
|
|||||||
@@ -351,7 +351,7 @@ const eventController = {
|
|||||||
const eventDetails = {
|
const eventDetails = {
|
||||||
title: body.title,
|
title: body.title,
|
||||||
// remove html tags
|
// remove html tags
|
||||||
description: helpers.sanitizeHTML(linkifyHtml(body.description)),
|
description: helpers.sanitizeHTML(linkifyHtml(body.description, { target: '_blank' })),
|
||||||
multidate: body.multidate,
|
multidate: body.multidate,
|
||||||
start_datetime: body.start_datetime,
|
start_datetime: body.start_datetime,
|
||||||
end_datetime: body.end_datetime,
|
end_datetime: body.end_datetime,
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ module.exports = {
|
|||||||
return domPurify.sanitize(html, {
|
return domPurify.sanitize(html, {
|
||||||
ALLOWED_TAGS: ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'br',
|
ALLOWED_TAGS: ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'br',
|
||||||
'h6', 'b', 'a', 'li', 'ul', 'ol', 'code', 'blockquote', 'u', 's', 'strong'],
|
'h6', 'b', 'a', 'li', 'ul', 'ol', 'code', 'blockquote', 'u', 's', 'strong'],
|
||||||
ALLOWED_ATTR: ['href']
|
ALLOWED_ATTR: ['href', 'target']
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user