diff --git a/components/Message.vue b/components/Message.vue index e8a91b5..c903012 100644 --- a/components/Message.vue +++ b/components/Message.vue @@ -60,7 +60,16 @@ const sanitized = ref(); onMounted(async () => { const parsed = await parse(props.text, { gfm: true }); - sanitized.value = DOMPurify.sanitize(parsed, { ALLOWED_TAGS: ["strong", "em", "br", "blockquote", "code", "ul", "ol", "li", "a", "h1", "h2", "h3", "h4", "h5", "h6"] }); + sanitized.value = DOMPurify.sanitize(parsed, { + ALLOWED_TAGS: [ + "strong", "em", "br", "blockquote", + "code", "ul", "ol", "li", "a", "h1", + "h2", "h3", "h4", "h5", "h6" + ], + ALLOW_DATA_ATTR: false, + ALLOW_SELF_CLOSE_IN_ATTR: false, + ALLOWED_ATTR: [] + }); console.log("adding listeners") await nextTick(); messageElement.value?.addEventListener("mouseenter", (e: Event) => {