diff --git a/src/pyj/book_list/book_details.pyj b/src/pyj/book_list/book_details.pyj index 25b5b48078..0cdd77fc09 100644 --- a/src/pyj/book_list/book_details.pyj +++ b/src/pyj/book_list/book_details.pyj @@ -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' diff --git a/src/pyj/read_book/view.pyj b/src/pyj/read_book/view.pyj index 3cded9fdcf..a24e01a618 100644 --- a/src/pyj/read_book/view.pyj +++ b/src/pyj/read_book/view.pyj @@ -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,