fix(reader): use CSP for protecting foliate instead of iframe sandbox (#848)
This commit is contained in:
@@ -83,7 +83,7 @@ export class FixedLayout extends HTMLElement {
|
||||
})
|
||||
// Foliate recommends disabling scripts for untrusted book content:
|
||||
// https://github.com/johnfactotum/foliate-js#security
|
||||
iframe.setAttribute('sandbox', 'allow-same-origin')
|
||||
iframe.setAttribute('sandbox', 'allow-same-origin allow-scripts')
|
||||
iframe.setAttribute('scrolling', 'no')
|
||||
iframe.setAttribute('part', 'filter')
|
||||
this.#root.append(element)
|
||||
|
||||
@@ -241,7 +241,7 @@ class View {
|
||||
})
|
||||
// Foliate recommends disabling scripts for untrusted book content:
|
||||
// https://github.com/johnfactotum/foliate-js#security
|
||||
this.#iframe.setAttribute('sandbox', 'allow-same-origin')
|
||||
this.#iframe.setAttribute('sandbox', 'allow-same-origin allow-scripts')
|
||||
this.#iframe.setAttribute('scrolling', 'no')
|
||||
}
|
||||
get element() {
|
||||
|
||||
Reference in New Issue
Block a user