Fixed: Link is escaped in wiki added/updated notification email (#11262).
Patch by Łukasz Jachymczyk. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9896 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
6529035ee1
commit
f9f5e9e7c6
|
@ -1,3 +1,3 @@
|
|||
<p><%= l(:mail_body_wiki_content_added, :id => link_to(h(@wiki_content.page.pretty_title), @wiki_content_url),
|
||||
:author => h(@wiki_content.author)) %><br />
|
||||
:author => h(@wiki_content.author)).html_safe %><br />
|
||||
<em><%=h @wiki_content.comments %></em></p>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<p><%= l(:mail_body_wiki_content_updated, :id => link_to(h(@wiki_content.page.pretty_title), @wiki_content_url),
|
||||
:author => h(@wiki_content.author)) %><br />
|
||||
:author => h(@wiki_content.author)).html_safe %><br />
|
||||
<em><%=h @wiki_content.comments %></em></p>
|
||||
|
||||
<p><%= l(:label_view_diff) %>:<br />
|
||||
|
|
|
@ -404,6 +404,11 @@ class MailerTest < ActiveSupport::TestCase
|
|||
Setting.default_language = lang.to_s
|
||||
assert_difference 'ActionMailer::Base.deliveries.size' do
|
||||
assert Mailer.wiki_content_added(content).deliver
|
||||
assert_select_email do
|
||||
assert_select 'a[href=?]',
|
||||
'http://mydomain.foo/projects/ecookbook/wiki/CookBook_documentation',
|
||||
:text => 'CookBook documentation'
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -414,6 +419,11 @@ class MailerTest < ActiveSupport::TestCase
|
|||
Setting.default_language = lang.to_s
|
||||
assert_difference 'ActionMailer::Base.deliveries.size' do
|
||||
assert Mailer.wiki_content_updated(content).deliver
|
||||
assert_select_email do
|
||||
assert_select 'a[href=?]',
|
||||
'http://mydomain.foo/projects/ecookbook/wiki/CookBook_documentation',
|
||||
:text => 'CookBook documentation'
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue