Commit 55c6def5 authored by Josh Bouganim's avatar Josh Bouganim Committed by Paul Slaughter

Update embedded snippet file links to open in new tab

- This prevents a csp error occurring when a snippet is embedded in an iframe
- https://gitlab.com/gitlab-org/gitlab/-/merge_requests/64219

Changelog: fixed
parent d960e711
......@@ -4,12 +4,12 @@
= external_snippet_icon('doc-text')
%strong.file-title-name
%a.gitlab-embedded-snippets-title{ href: url_for(only_path: false, overwrite_params: nil) }
%a.gitlab-embedded-snippets-title{ href: url_for(only_path: false, overwrite_params: nil), target: '_blank', rel: 'noopener noreferrer' }
= blob.name
%small
= number_to_human_size(blob.size)
%a.gitlab-logo-wrapper{ href: url_for(only_path: false, overwrite_params: nil), title: 'view on gitlab' }
%a.gitlab-logo-wrapper{ href: url_for(only_path: false, overwrite_params: nil), title: 'View on GitLab', target: '_blank', rel: 'noopener noreferrer' }
%img.gitlab-logo{ src: image_url('ext_snippet_icons/logo.svg'), alt: "GitLab logo" }
.file-actions.d-none.d-sm-block
......
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