Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
c0c9e5dd
Commit
c0c9e5dd
authored
Aug 03, 2018
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ensure links in notifications footer are not escaped
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
9db52451
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
1 deletion
+10
-1
app/views/layouts/notify.html.haml
app/views/layouts/notify.html.haml
+1
-1
changelogs/unreleased/49899-merge-request-e-mail-link-has-full-url.yml
...released/49899-merge-request-e-mail-link-has-full-url.yml
+5
-0
spec/support/shared_examples/notify_shared_examples.rb
spec/support/shared_examples/notify_shared_examples.rb
+4
-0
No files found.
app/views/layouts/notify.html.haml
View file @
c0c9e5dd
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
%br
%br
-
if
@target_url
-
if
@target_url
-
if
@reply_by_email
-
if
@reply_by_email
=
_
(
'Reply to this email directly or %{view_it_on_gitlab}.'
)
%
{
view_it_on_gitlab:
link_to
(
_
(
"view it on GitLab"
),
@target_url
)
}
=
_
(
'Reply to this email directly or %{view_it_on_gitlab}.'
)
.
html_safe
%
{
view_it_on_gitlab:
link_to
(
_
(
"view it on GitLab"
),
@target_url
)
}
-
else
-
else
#{
link_to
_
(
"View it on GitLab"
),
@target_url
}
.
#{
link_to
_
(
"View it on GitLab"
),
@target_url
}
.
%br
%br
...
...
changelogs/unreleased/49899-merge-request-e-mail-link-has-full-url.yml
0 → 100644
View file @
c0c9e5dd
---
title
:
Ensure links in notifications footer are not escaped
merge_request
:
21000
author
:
type
:
fixed
spec/support/shared_examples/notify_shared_examples.rb
View file @
c0c9e5dd
...
@@ -87,6 +87,10 @@ shared_examples 'an email starting a new thread with reply-by-email enabled' do
...
@@ -87,6 +87,10 @@ shared_examples 'an email starting a new thread with reply-by-email enabled' do
include_examples
'an email with X-GitLab headers containing project details'
include_examples
'an email with X-GitLab headers containing project details'
include_examples
'a new thread email with reply-by-email enabled'
include_examples
'a new thread email with reply-by-email enabled'
it
'includes "Reply to this email directly or <View it on GitLab>"'
do
expect
(
subject
.
default_part
.
body
).
to
include
(
%(Reply to this email directly or <a href="#{Gitlab::UrlBuilder.build(model)}">view it on GitLab</a>.)
)
end
context
'when reply-by-email is enabled with incoming address with %{key}'
do
context
'when reply-by-email is enabled with incoming address with %{key}'
do
it
'has a Reply-To header'
do
it
'has a Reply-To header'
do
is_expected
.
to
have_header
'Reply-To'
,
/<reply+(.*)@
#{
Gitlab
.
config
.
gitlab
.
host
}
>\Z/
is_expected
.
to
have_header
'Reply-To'
,
/<reply+(.*)@
#{
Gitlab
.
config
.
gitlab
.
host
}
>\Z/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment