1
0
Эх сурвалжийг харах

prevent iframe noscript contents to be displayed

Gildas 7 жил өмнө
parent
commit
5ed11745a4

+ 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);