From 53ea88d1c4e1bb9ae37f8cfe30ce1eae89681e25 Mon Sep 17 00:00:00 2001 From: Wanjin Noh Date: Thu, 19 Dec 2024 17:35:09 +0900 Subject: [PATCH] fix(editor): update markdown processing to use sanitized HTML output Signed-off-by: Wanjin Noh --- apps/web/src/common/components/editor/TextEditorViewer.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/web/src/common/components/editor/TextEditorViewer.vue b/apps/web/src/common/components/editor/TextEditorViewer.vue index c0259062b5..b0398c2205 100644 --- a/apps/web/src/common/components/editor/TextEditorViewer.vue +++ b/apps/web/src/common/components/editor/TextEditorViewer.vue @@ -22,10 +22,10 @@ const props = withDefaults(defineProps(), { }); loadMonospaceFonts(); -const { markdown } = useMarkdown(toRef(props, 'contents')); +const { sanitizedHtml } = useMarkdown({ value: toRef(props, 'contents') }); const refinedContents = computed(() => { if (props.contentType === 'markdown') { - return markdown.value; + return sanitizedHtml.value; } return setAttachmentsToContents(props.contents, props.attachments); });