Defect #11262 » 0001-Fix-escaping-of-html-links-in-wiki-mailer-notificati.patch
| app/views/mailer/wiki_content_added.html.erb | ||
|---|---|---|
|
<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>
|
||
| app/views/mailer/wiki_content_updated.html.erb | ||
|---|---|---|
|
<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 />
|
||
| test/unit/mailer_test.rb | ||
|---|---|---|
|
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
|
||
| ... | ... | |
|
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
|
||