Commit 178a84ec authored by Jose Ivan Vargas's avatar Jose Ivan Vargas

Merge branch 'djadmin-fix-mermaid-broken-links' into 'master'

Allow popups and links within mermaid diagrams

See merge request gitlab-org/gitlab!82012
parents 2ef5f23a 2dd16c32
...@@ -88,7 +88,7 @@ function renderMermaidEl(el, source) { ...@@ -88,7 +88,7 @@ function renderMermaidEl(el, source) {
const iframeEl = document.createElement('iframe'); const iframeEl = document.createElement('iframe');
setAttributes(iframeEl, { setAttributes(iframeEl, {
src: getSandboxFrameSrc(), src: getSandboxFrameSrc(),
sandbox: 'allow-scripts', sandbox: 'allow-scripts allow-popups',
frameBorder: 0, frameBorder: 0,
scrolling: 'no', scrolling: 'no',
width: '100%', width: '100%',
......
...@@ -26,7 +26,7 @@ RSpec.describe 'Sandboxed Mermaid rendering', :js do ...@@ -26,7 +26,7 @@ RSpec.describe 'Sandboxed Mermaid rendering', :js do
wait_for_requests wait_for_requests
expected = %(<iframe src="/-/sandbox/mermaid" sandbox="allow-scripts" frameborder="0" scrolling="no") expected = %(<iframe src="/-/sandbox/mermaid" sandbox="allow-scripts allow-popups" frameborder="0" scrolling="no")
expect(page.html).to include(expected) expect(page.html).to include(expected)
end end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment