From c3616a73fd82290b37f7e8e15e852a0483849b4a Mon Sep 17 00:00:00 2001 From: Yufan Sheng Date: Mon, 17 Jun 2024 03:54:38 +0800 Subject: [PATCH] chore: filter the onerror for img. --- src/components/comment/artalk.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/components/comment/artalk.ts b/src/components/comment/artalk.ts index d5a4973..3b15c10 100644 --- a/src/components/comment/artalk.ts +++ b/src/components/comment/artalk.ts @@ -134,6 +134,9 @@ const parseContent = async (content: string): Promise => { 'ol', 'li', ], + allowAttributes: { + img: ['src', 'width', 'height', 'rel', 'target'], + }, allowComments: false, }), ]);