Skip to content

Commit b189baf

Browse files
committed
Added allow-downloads to iframe sandbox.
1 parent 7af68b1 commit b189baf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

preview-url/jquery.previewurl.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
if (previewtype && previewtype === 'image/gif' || previewtype === 'image/jpeg' || previewtype === 'image/png') previewclone = $('<img>').attr('src', url);
2020
else if (previewtype && previewtype.lastIndexOf('audio/', 0) > -1 && audioelem.canPlayType && audioelem.canPlayType(previewtype)) previewclone = $('<audio>').attr('src', url).prop('controls', true);
2121
else if (previewtype && previewtype.lastIndexOf('video/', 0) > -1 && videoelem.canPlayType && videoelem.canPlayType(previewtype)) previewclone = $('<video>').attr('src', url).prop('controls', true);
22-
else if (previewtype && previewtype === 'iframe') previewclone = $('<iframe>').attr('src', url).attr('frameborder', '0').attr('sandbox', 'allow-scripts allow-same-origin allow-forms allow-popups').attr('allow', 'autoplay; encrypted-media');
22+
else if (previewtype && previewtype === 'iframe') previewclone = $('<iframe>').attr('src', url).attr('frameborder', '0').attr('sandbox', 'allow-scripts allow-same-origin allow-forms allow-popups allow-downloads').attr('allow', 'autoplay; encrypted-media');
2323
else return false;
2424

2525
var previewbackground = $('<div>').addClass('previewurl_dialog_background');

0 commit comments

Comments
 (0)