mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-06-19 13:21:46 +00:00
fix(pdf): add allow-scripts to iframe sandbox to suppress CSP warning
This commit is contained in:
@@ -308,7 +308,7 @@ export async function downloadJourneyBookPDF(journey: JourneyDetail) {
|
|||||||
|
|
||||||
const iframe = document.createElement('iframe')
|
const iframe = document.createElement('iframe')
|
||||||
iframe.style.cssText = 'flex:1;width:100%;border:none;'
|
iframe.style.cssText = 'flex:1;width:100%;border:none;'
|
||||||
iframe.sandbox = 'allow-same-origin allow-modals'
|
iframe.sandbox = 'allow-same-origin allow-modals allow-scripts'
|
||||||
iframe.srcdoc = html
|
iframe.srcdoc = html
|
||||||
|
|
||||||
card.appendChild(header)
|
card.appendChild(header)
|
||||||
|
|||||||
@@ -521,7 +521,7 @@ ${daysHtml}
|
|||||||
|
|
||||||
const iframe = document.createElement('iframe')
|
const iframe = document.createElement('iframe')
|
||||||
iframe.style.cssText = 'flex:1;width:100%;border:none;'
|
iframe.style.cssText = 'flex:1;width:100%;border:none;'
|
||||||
iframe.sandbox = 'allow-same-origin allow-modals'
|
iframe.sandbox = 'allow-same-origin allow-modals allow-scripts'
|
||||||
iframe.srcdoc = html
|
iframe.srcdoc = html
|
||||||
|
|
||||||
card.appendChild(header)
|
card.appendChild(header)
|
||||||
|
|||||||
Reference in New Issue
Block a user