##// END OF EJS Templates
Fixed: Link is escaped in wiki added/updated notification email (#11262)....
Jean-Philippe Lang -
r9713:f9f5e9e7c6c6
parent child
Show More
@@ -1,3 +1,3
1 <p><%= l(:mail_body_wiki_content_added, :id => link_to(h(@wiki_content.page.pretty_title), @wiki_content_url),
1 <p><%= l(:mail_body_wiki_content_added, :id => link_to(h(@wiki_content.page.pretty_title), @wiki_content_url),
2 :author => h(@wiki_content.author)) %><br />
2 :author => h(@wiki_content.author)).html_safe %><br />
3 <em><%=h @wiki_content.comments %></em></p>
3 <em><%=h @wiki_content.comments %></em></p>
@@ -1,5 +1,5
1 <p><%= l(:mail_body_wiki_content_updated, :id => link_to(h(@wiki_content.page.pretty_title), @wiki_content_url),
1 <p><%= l(:mail_body_wiki_content_updated, :id => link_to(h(@wiki_content.page.pretty_title), @wiki_content_url),
2 :author => h(@wiki_content.author)) %><br />
2 :author => h(@wiki_content.author)).html_safe %><br />
3 <em><%=h @wiki_content.comments %></em></p>
3 <em><%=h @wiki_content.comments %></em></p>
4
4
5 <p><%= l(:label_view_diff) %>:<br />
5 <p><%= l(:label_view_diff) %>:<br />
@@ -404,6 +404,11 class MailerTest < ActiveSupport::TestCase
404 Setting.default_language = lang.to_s
404 Setting.default_language = lang.to_s
405 assert_difference 'ActionMailer::Base.deliveries.size' do
405 assert_difference 'ActionMailer::Base.deliveries.size' do
406 assert Mailer.wiki_content_added(content).deliver
406 assert Mailer.wiki_content_added(content).deliver
407 assert_select_email do
408 assert_select 'a[href=?]',
409 'http://mydomain.foo/projects/ecookbook/wiki/CookBook_documentation',
410 :text => 'CookBook documentation'
411 end
407 end
412 end
408 end
413 end
409 end
414 end
@@ -414,6 +419,11 class MailerTest < ActiveSupport::TestCase
414 Setting.default_language = lang.to_s
419 Setting.default_language = lang.to_s
415 assert_difference 'ActionMailer::Base.deliveries.size' do
420 assert_difference 'ActionMailer::Base.deliveries.size' do
416 assert Mailer.wiki_content_updated(content).deliver
421 assert Mailer.wiki_content_updated(content).deliver
422 assert_select_email do
423 assert_select 'a[href=?]',
424 'http://mydomain.foo/projects/ecookbook/wiki/CookBook_documentation',
425 :text => 'CookBook documentation'
426 end
417 end
427 end
418 end
428 end
419 end
429 end
General Comments 0
You need to be logged in to leave comments. Login now