Explorar o código

fix: exclude non-class attributes from markdown rendering

NGPixel %!s(int64=5) %!d(string=hai) anos
pai
achega
fb0c64a07e
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      server/modules/rendering/markdown-core/renderer.js

+ 3 - 1
server/modules/rendering/markdown-core/renderer.js

@@ -30,7 +30,9 @@ module.exports = {
       }
     })
 
-    mkdown.use(mdAttrs)
+    mkdown.use(mdAttrs, {
+      allowedAttributes: ['id', 'class']
+    })
 
     for (let child of this.children) {
       const renderer = require(`../${_.kebabCase(child.key)}/renderer.js`)