Skip to content

Commit

Permalink
Bug 1905416: Fix sandboxed links in MarkdownView iframe
Browse files Browse the repository at this point in the history
Add `allow-popups-to-escape-sandbox` to MarkdownView iframe `sandbox` attribute so that links with
`target="_blank"` don't inherit the sandbox restrictions.
  • Loading branch information
TheRealJon committed Jan 11, 2021
1 parent b7782d5 commit df568bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/public/components/markdown-view.tsx
Expand Up @@ -156,7 +156,7 @@ export class SyncMarkdownView extends React.Component<SyncMarkdownProps, State>
return (
<>
<iframe
sandbox="allow-popups allow-same-origin"
sandbox="allow-popups allow-popups-to-escape-sandbox allow-same-origin"
srcDoc={contents}
style={{ border: '0px', display: 'block', width: '100%', height: '0' }}
ref={(r) => (this.frame = r)}
Expand Down

0 comments on commit df568bf

Please sign in to comment.