From b95d2435b1ec2246959251e019604fe9ef576090 Mon Sep 17 00:00:00 2001 From: anshika1179 Date: Wed, 5 Aug 2026 15:23:08 +0530 Subject: [PATCH] fix(ui): allow advanced markdown syntax in MarkdownRenderer (fixes #1912) --- src/components/MarkdownRenderer.tsx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/components/MarkdownRenderer.tsx b/src/components/MarkdownRenderer.tsx index 1ffd5395..88f76605 100644 --- a/src/components/MarkdownRenderer.tsx +++ b/src/components/MarkdownRenderer.tsx @@ -12,9 +12,18 @@ interface MarkdownRendererProps { const remarkPlugins: PluggableList = [remarkGfm]; const strictSchema = { ...defaultSchema, + tagNames: [ + ...(defaultSchema.tagNames || []), + 'input', + 'table', 'thead', 'tbody', 'tr', 'th', 'td' + ], attributes: { ...defaultSchema.attributes, + '*': ['className', 'style'], a: ['href', 'title', 'target', 'rel'], + input: ['type', 'checked', 'disabled'], + th: ['align', 'colSpan', 'rowSpan'], + td: ['align', 'colSpan', 'rowSpan'], }, protocols: { ...defaultSchema.protocols,