Skip to content

Commit

Permalink
fix: deny browser automated downloads from the import frame to trigge…
Browse files Browse the repository at this point in the history
…r standard warning notification in web console
  • Loading branch information
catalan-adobe committed May 22, 2023
1 parent fe73c38 commit 8c38da9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions js/crawl/crawl.ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,11 @@ const attachListeners = () => {
const frame = document.createElement('iframe');
frame.id = 'crawl-content-frame';

let sandboxAttr = 'allow-same-origin';
if (config.fields['crawl-enable-js']) {
frame.removeAttribute('sandbox');
} else {
frame.setAttribute('sandbox', 'allow-same-origin');
sandboxAttr += ' allow-scripts';
}
frame.setAttribute('sandbox', sandboxAttr);

const onLoad = async () => {
if (config.fields['import-scroll-to-bottom']) {
Expand Down

0 comments on commit 8c38da9

Please sign in to comment.