Fix image injection for custom markup

pull/4208/head
Chocobozzz 2021-06-25 15:10:39 +02:00
parent 2370d9cc4a
commit 0d25c59414
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 3 additions and 1 deletions

View File

@ -30,11 +30,13 @@ export function getCustomMarkupSanitizeOptions (additionalAllowedTags: string[]
allowedTags: [
...base.allowedTags,
...additionalAllowedTags,
'div', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6'
'div', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'img'
],
allowedSchemes: base.allowedSchemes,
allowedAttributes: {
...base.allowedAttributes,
'img': [ 'src', 'alt' ],
'*': [ 'data-*', 'style' ]
}
}