瀏覽代碼

fix(ui): preserve target attribute in DOMPurify config for markdown links (#28598)

Kagura 2 月之前
父節點
當前提交
4d900b2f46
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      packages/ui/src/components/markdown.tsx

+ 1 - 1
packages/ui/src/components/markdown.tsx

@@ -34,7 +34,7 @@ const config = {
   FORBID_TAGS: ["style"],
   FORBID_CONTENTS: ["style", "script"],
   ADD_TAGS: ["svg", "path"],
-  ADD_ATTR: ["d", "viewBox", "preserveAspectRatio", "xmlns"],
+  ADD_ATTR: ["d", "viewBox", "preserveAspectRatio", "xmlns", "target"],
 }
 
 const iconPaths = {