Explorar o código

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

Regev Brody %!s(int64=5) %!d(string=hai) anos
pai
achega
037822b994
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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) {