mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Content server: Fix links to external resources in book details and the viewer not working
This commit is contained in:
parent
03e862aa70
commit
8029bef98b
@ -132,7 +132,7 @@ def adjusting_sandboxed_html(html):
|
||||
css = 'html, body {{ overflow: hidden; color: {} }}'.format(get_color('window-foreground'))
|
||||
# allow-same-origin is needed for resizing and allow-popups is needed for
|
||||
# target="_blank"
|
||||
ans = sandboxed_html(html, css, 'allow-same-origin allow-popups')
|
||||
ans = sandboxed_html(html, css, 'allow-same-origin allow-popups allow-popups-to-escape-sandbox')
|
||||
ans.addEventListener('load', def(ev): setup_iframe(ev.target);)
|
||||
ans.style.height = '50vh'
|
||||
ans.dataset.last_window_width = '0'
|
||||
|
@ -135,7 +135,7 @@ class View:
|
||||
left_margin,
|
||||
E.div(style='flex-grow:2; display:flex; align-items:stretch; flex-direction: column', # container for top and bottom margins
|
||||
margin_elem(sd, 'margin_top', 'book-top-margin', self.top_margin_clicked),
|
||||
E.iframe(id=iframe_id, seamless=True, sandbox='allow-popups allow-scripts', style='flex-grow: 2', allowfullscreen='true'),
|
||||
E.iframe(id=iframe_id, seamless=True, sandbox='allow-popups allow-scripts allow-popups-to-escape-sandbox', style='flex-grow: 2', allowfullscreen='true'),
|
||||
margin_elem(sd, 'margin_bottom', 'book-bottom-margin'),
|
||||
),
|
||||
right_margin,
|
||||
|
Loading…
x
Reference in New Issue
Block a user