Merge branch '609120-ref-link' into 'master'
Fixes ref being displayed as raw HTML Closes #60912 See merge request gitlab-org/gitlab-ce!28823
This commit is contained in:
commit
c18136ae48
3 changed files with 12 additions and 1 deletions
|
@ -43,7 +43,7 @@ module Ci
|
|||
if pipeline.ref_exists?
|
||||
_("for %{link_to_pipeline_ref}").html_safe % { link_to_pipeline_ref: link_to_pipeline_ref }
|
||||
else
|
||||
_("for %{ref}") % { ref: content_tag(:span, pipeline.ref, class: 'ref-name') }
|
||||
_("for %{ref}").html_safe % { ref: content_tag(:span, pipeline.ref, class: 'ref-name') }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
5
changelogs/unreleased/609120-ref-link.yml
Normal file
5
changelogs/unreleased/609120-ref-link.yml
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Fixes Ref link being displayed as raw HTML in the Pipelines page
|
||||
merge_request: 28823
|
||||
author:
|
||||
type: fixed
|
|
@ -328,6 +328,12 @@ describe 'Pipeline', :js do
|
|||
expect(page).not_to have_link(pipeline.ref)
|
||||
expect(page).to have_content(pipeline.ref)
|
||||
end
|
||||
|
||||
it 'does not render render raw HTML to the pipeline ref' do
|
||||
page.within '.pipeline-info' do
|
||||
expect(page).not_to have_content('<span class="ref-name"')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context 'when pipeline is detached merge request pipeline' do
|
||||
|
|
Loading…
Reference in a new issue