gitlab-org--gitlab-foss/app/views/projects/blob/_text.html.haml
Jacob Schatz c5a9d73ad8 Merge branch 'fix-links-target-blank' into 'security'
Adds rel="noopener noreferrer" to all links with target="_blank"

See merge request !2071
2017-03-20 18:51:36 -07:00

19 lines
593 B
Text

- if blob.only_display_raw?
.file-content.code
.nothing-here-block
File too large, you can
= succeed '.' do
= link_to 'view the raw file', namespace_project_raw_path(@project.namespace, @project, @id), target: '_blank', rel: 'noopener noreferrer'
- else
- blob.load_all_data!(@repository)
- if blob.empty?
.file-content.code
.nothing-here-block Empty file
- else
- if markup?(blob.name)
.file-content.wiki
= render_markup(blob.name, blob.data)
- else
= render 'shared/file_highlight', blob: blob, repository: @repository