From 177cade648a734f893c7ea77aa5aa9800fa87c32 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, }), ]);