Merge pull request #1457 from processing/allow-downloads

[#1443] Add 'allow-downloads' to iframe sandbox
This commit is contained in:
Cassie Tarakajian 2020-06-15 13:21:28 -04:00 committed by GitHub
commit 53cb30532e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -353,6 +353,8 @@ class PreviewFrame extends React.Component {
'preview-frame': true,
'preview-frame--full-view': this.props.fullView
});
const sandboxAttributes =
'allow-scripts allow-pointer-lock allow-same-origin allow-popups allow-forms allow-modals allow-downloads';
return (
<iframe
id="canvas_frame"
@ -362,7 +364,7 @@ class PreviewFrame extends React.Component {
frameBorder="0"
title="sketch preview"
ref={(element) => { this.iframeElement = element; }}
sandbox="allow-scripts allow-pointer-lock allow-same-origin allow-popups allow-forms allow-modals"
sandbox={sandboxAttributes}
/>
);
}