소스 검색

fix: secure html module removes target attribute from links (#2012)

Regev Brody 5 년 전
부모
커밋
037822b994
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      server/modules/rendering/html-security/renderer.js

+ 1 - 1
server/modules/rendering/html-security/renderer.js

@@ -7,7 +7,7 @@ module.exports = {
       const window = new JSDOM('').window
       const DOMPurify = createDOMPurify(window)
 
-      const allowedAttrs = ['v-pre', 'v-slot:tabs', 'v-slot:content']
+      const allowedAttrs = ['v-pre', 'v-slot:tabs', 'v-slot:content', 'target']
       const allowedTags = ['tabset', 'template']
 
       if (config.allowIFrames) {