From 0d25c5941466d824e0840b0381e368736f813d51 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 25 Jun 2021 15:10:39 +0200 Subject: Fix image injection for custom markup --- shared/core-utils/renderer/html.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/shared/core-utils/renderer/html.ts b/shared/core-utils/renderer/html.ts index bbf8b3fbd..c9757be85 100644 --- a/shared/core-utils/renderer/html.ts +++ b/shared/core-utils/renderer/html.ts @@ -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' ] } } -- cgit v1.2.3