💄 Adjusted email previews to better represent email behaviour of embed cards (#1554)

no issue

- added `sandbox` attribute which blocks scripts from running inside the iframe
- results in better representation of how embeds will render in emails where scripts are not allowed
This commit is contained in:
Kevin Ansfield 2020-05-08 11:54:18 +01:00 committed by GitHub
parent 574557dbb2
commit a30f0b2851

View File

@ -15,7 +15,7 @@
<div class="modal-body modal-preview-email-content gh-pe-mobile-container" style="display: flex;justify-content: center;">
<div class="gh-pe-mobile-bezel">
<div class="gh-pe-mobile-screen">
<iframe class="bn gh-pe-iframe" {{did-insert this.renderEmailPreview}}></iframe>
<iframe class="bn gh-pe-iframe" {{did-insert this.renderEmailPreview}} sandbox="allow-same-origin"></iframe>
</div>
</div>
</div>
@ -23,6 +23,6 @@
{{#if (eq this.type "desktop")}}
<div class="modal-body modal-preview-email-content gh-pe-desktop-container">
<iframe class="bn miw-100 gh-pe-iframe" style="height:100%;" {{did-insert this.renderEmailPreview}}></iframe>
<iframe class="bn miw-100 gh-pe-iframe" style="height:100%;" {{did-insert this.renderEmailPreview}} sandbox="allow-same-origin"></iframe>
</div>
{{/if}}