diff --git a/src/lib/viewers/office/OfficeViewer.js b/src/lib/viewers/office/OfficeViewer.js index 4ef7f6fd1..291ef43ab 100644 --- a/src/lib/viewers/office/OfficeViewer.js +++ b/src/lib/viewers/office/OfficeViewer.js @@ -268,7 +268,7 @@ class OfficeViewer extends BaseViewer { iframeEl.setAttribute('width', '100%'); iframeEl.setAttribute('height', '100%'); iframeEl.setAttribute('frameborder', 0); - iframeEl.setAttribute('sandbox', 'allow-scripts allow-same-origin allow-forms allow-popups'); + iframeEl.setAttribute('sandbox', 'allow-scripts allow-same-origin allow-forms allow-popups allow-downloads'); if (this.platformSetup) { iframeEl.setAttribute('allowfullscreen', 'true'); diff --git a/src/lib/viewers/office/__tests__/OfficeViewer-test.js b/src/lib/viewers/office/__tests__/OfficeViewer-test.js index db3f2c878..af4863ede 100644 --- a/src/lib/viewers/office/__tests__/OfficeViewer-test.js +++ b/src/lib/viewers/office/__tests__/OfficeViewer-test.js @@ -268,7 +268,9 @@ describe('lib/viewers/office/OfficeViewer', () => { expect(iframeEl.width).toBe('100%'); expect(iframeEl.height).toBe('100%'); expect(iframeEl.frameBorder).toBe('0'); - expect(iframeEl.getAttribute('sandbox')).toBe('allow-scripts allow-same-origin allow-forms allow-popups'); + expect(iframeEl.getAttribute('sandbox')).toBe( + 'allow-scripts allow-same-origin allow-forms allow-popups allow-downloads', + ); }); test('should allow fullscreen if using the platform setup', () => {