Jelajahi Sumber

prevent iframe noscript contents to be displayed

Gildas 7 tahun lalu
induk
melakukan
5ed11745a4
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  1. 1 1
      lib/single-file/single-file-core.js

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

@@ -590,7 +590,7 @@ this.SingleFileCore = this.SingleFileCore || (() => {
 				const frameElements = Array.from(this.doc.querySelectorAll("iframe, frame, object[type=\"text/html\"][data]"));
 				await Promise.all(frameElements.map(async frameElement => {
 					DomProcessorHelper.setFrameEmptySrc(frameElement);
-					frameElement.setAttribute("sandbox", "");
+					frameElement.setAttribute("sandbox", "allow-scripts allow-same-origin");
 					const frameWindowId = frameElement.getAttribute(DOM.windowIdAttributeName(this.options.sessionId));
 					if (frameWindowId) {
 						const frameData = this.options.framesData.find(frame => frame.windowId == frameWindowId);