From d774729b3b5ebce6be20b42c0e0b3acfc727ea2f Mon Sep 17 00:00:00 2001 From: yflory Date: Thu, 30 Apr 2026 16:36:49 +0200 Subject: [PATCH] fix(pdf): update pdf iframe attributes --- www/common/media-tag.js | 1 + 1 file changed, 1 insertion(+) diff --git a/www/common/media-tag.js b/www/common/media-tag.js index 99eaa3307..ed022c6f2 100644 --- a/www/common/media-tag.js +++ b/www/common/media-tag.js @@ -120,6 +120,7 @@ var factory = function (Util) { var iframe = document.createElement('iframe'); if (cfg.pdf.viewer) { // PDFJS var viewerUrl = cfg.pdf.viewer + '?file=' + url; + iframe.setAttribute('sandbox', 'allow-scripts allow-downloads allow-same-origin'); iframe.src = viewerUrl + '#' + window.encodeURIComponent(metadata.name); iframe.onload = function () { if (!metadata.name) { return; }