浏览代码

fix: security html module removes allow attribute from iframes (#2354)

* fix: secure html module removes allowfullscreen, allow and frameborder attributes from iframes
* Apply suggestions from code review
fix: remove deprecated attributes for iframe in secure html module

Co-authored-by: Nicolas Giard <github@ngpixel.com>
Иван 4 年之前
父节点
当前提交
79c5b8fac2
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      server/modules/rendering/html-security/renderer.js

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

@@ -29,6 +29,7 @@ module.exports = {
 
       if (config.allowIFrames) {
         allowedTags.push('iframe')
+        allowedAttrs.push('allow')
       }
 
       input = DOMPurify.sanitize(input, {