fix(pdf): update pdf iframe attributes

This commit is contained in:
yflory 2026-04-30 16:36:49 +02:00
parent 10d8e4332c
commit d774729b3b

View File

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