From 2f8ab065a1a1c3d8724bce77c28f0649ebc22239 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?marcin=20miko=C5=82ajczak?= Date: Sun, 29 Sep 2024 18:16:24 +0200 Subject: [PATCH] pl-fe: Support emojis in poll options MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- packages/pl-fe/src/normalizers/poll.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/pl-fe/src/normalizers/poll.ts b/packages/pl-fe/src/normalizers/poll.ts index 4fa2c14df9..5dc410b213 100644 --- a/packages/pl-fe/src/normalizers/poll.ts +++ b/packages/pl-fe/src/normalizers/poll.ts @@ -5,7 +5,7 @@ import { Status as BaseStatus, StatusEdit as BaseStatusEdit, CustomEmoji } from import emojify from 'pl-fe/features/emoji'; import { makeEmojiMap } from 'pl-fe/utils/normalizers'; -const sanitizeTitle = (text: string, emojiMap: any) => DOMPurify.sanitize(emojify(escapeTextContentForBrowser(text), emojiMap), { ALLOWED_TAGS: [] }); +const sanitizeTitle = (text: string, emojiMap: any) => DOMPurify.sanitize(emojify(escapeTextContentForBrowser(text), emojiMap), { ALLOWED_TAGS: ['img'] }); const normalizePoll = (poll: Exclude) => { const emojiMap = makeEmojiMap(poll.emojis);