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; }