Kaynağa Gözat

added "allow-popups" in the sandbow attribute

Gildas 7 yıl önce
ebeveyn
işleme
b94990c7b3
1 değiştirilmiş dosya ile 2 ekleme ve 2 silme
  1. 2 2
      lib/single-file/single-file-core.js

+ 2 - 2
lib/single-file/single-file-core.js

@@ -989,9 +989,9 @@ this.SingleFileCore = this.SingleFileCore || (() => {
 								const pageData = await frameData.processor.getPageData();
 								frameElement.removeAttribute(docUtil.WIN_ID_ATTRIBUTE_NAME);
 								if (pageData.content.match(NOSCRIPT_TAG_FOUND) || pageData.content.match(SCRIPT_TAG_FOUND)) {
-									frameElement.setAttribute("sandbox", "allow-scripts allow-same-origin");
+									frameElement.setAttribute("sandbox", "allow-popups allow-scripts allow-same-origin");
 								} else {
-									frameElement.setAttribute("sandbox", "");
+									frameElement.setAttribute("sandbox", "allow-popups");
 								}
 								if (frameElement.tagName == "OBJECT") {
 									frameElement.setAttribute("data", "data:text/html," + pageData.content);