From c7e7f33240d8e5661c77ad3417363bb4d44b6c9f Mon Sep 17 00:00:00 2001 From: SauceyRed Date: Mon, 2 Jun 2025 11:06:08 +0200 Subject: [PATCH] feat: add sanitized ref variable --- components/Message.vue | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/Message.vue b/components/Message.vue index e7d9449..3979a88 100644 --- a/components/Message.vue +++ b/components/Message.vue @@ -73,6 +73,8 @@ if (props.format == "12") { console.log("message:", props.text); console.log("author:", props.username); +const sanitized = ref(); + onMounted(async () => { const parsed = await parseInline(props.text, {gfm: true }); sanitized.value = DOMPurify.sanitize(parsed, { ALLOWED_TAGS: ["strong", "em", "br", "blockquote", "code", "ul", "ol", "li", "a"] });