[#1443] Add 'allow-downloads' to iframe sandbox

This commit is contained in:
Cassie Tarakajian 2020-06-15 13:14:48 -04:00
parent b805754d04
commit fb7b3eaef4

View file

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