浏览代码

[HOTFIX/884]Fixes Uncaught TypeError: Cannot read properties of null (reading 'toString') at Object.fixSelfXSS (tarteaucitron.js?1638786396:1772:21)
if tac_iframe does not have any title fixSelfXss fails.
This commit fixes #884

Luc MULLER 3 年之前
父节点
当前提交
6bf0ea929d
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      tarteaucitron.services.js

+ 1 - 1
tarteaucitron.services.js

@@ -12,7 +12,7 @@ tarteaucitron.services.iframe = {
     "js": function () {
         "use strict";
         tarteaucitron.fallback(['tac_iframe'], function (x) {
-            var frame_title = tarteaucitron.fixSelfXSS(x.getAttribute("title")),
+            var frame_title = (x.getAttribute("title")) ? tarteaucitron.fixSelfXSS(x.getAttribute("title")) : '',
                 width = x.getAttribute("width"),
                 height = x.getAttribute("height"),
                 allowfullscreen = x.getAttribute("allowfullscreen"),