Skip to content
代码片段 群组 项目
提交 a6057376 编辑于 作者: Kushal Pandya's avatar Kushal Pandya
浏览文件

Merge branch 'fix-wrong-link-about-target' into 'master'

Fix wrong position of "target=_blank"

See merge request gitlab-org/gitlab!95498
No related branches found
No related tags found
无相关合并请求
......@@ -25,8 +25,8 @@
= s_("Profiles|This email will be displayed on your public profile.")
.form-group.gl-form-group
- commit_email_link_url = help_page_path('user/profile/index', anchor: 'change-the-email-displayed-on-your-commits', target: '_blank')
- commit_email_link_start = '<a href="%{url}">'.html_safe % { url: commit_email_link_url }
- commit_email_link_url = help_page_path('user/profile/index', anchor: 'change-the-email-displayed-on-your-commits')
- commit_email_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: commit_email_link_url }
- commit_email_docs_link = s_('Profiles|This email will be used for web based operations, such as edits and merges. %{commit_email_link_start}Learn more.%{commit_email_link_end}').html_safe % { commit_email_link_start: commit_email_link_start, commit_email_link_end: '</a>'.html_safe }
= form.label :commit_email, s_('Profiles|Commit email')
.gl-md-form-input-lg
......
......@@ -17,6 +17,11 @@
expect(rendered).to have_field('user_name', with: user.name)
expect(rendered).to have_field('user_id', with: user.id)
expectd_link = help_page_path('user/profile/index', anchor: 'change-the-email-displayed-on-your-commits')
expected_link_html = "<a href=\"#{expectd_link}\" target=\"_blank\" " \
"rel=\"noopener noreferrer\">#{_('Learn more.')}</a>"
expect(rendered.include?(expected_link_html)).to eq(true)
end
end
end
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册