Content server: Fix links to external resources in book details and the viewer not working

This commit is contained in:
Kovid Goyal 2019-04-17 09:45:48 +05:30
parent 03e862aa70
commit 8029bef98b
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 2 additions and 2 deletions

View File

@ -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'

View File

@ -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,