diff --git a/app/helpers/notifier_helper.rb b/app/helpers/notifier_helper.rb index 5889b6ff8..be01e5391 100644 --- a/app/helpers/notifier_helper.rb +++ b/app/helpers/notifier_helper.rb @@ -18,4 +18,8 @@ module NotifierHelper :locals => { :body => capture(&block) } ) end + + def apply_inline_css(html) + html.gsub /
/, '
' + end end diff --git a/app/views/layouts/notifier.html.erb b/app/views/layouts/notifier.html.erb index 8122125cb..8575424f2 100644 --- a/app/views/layouts/notifier.html.erb +++ b/app/views/layouts/notifier.html.erb @@ -1,6 +1,5 @@
-- <%= yield %> + <%= raw apply_inline_css(yield) %> |
- <%# Some email clients (e.g. Yahoo as of 2017-01) remove the margin
- on tags. Since the body itself always starts with a , by - wrapping the image here in a as well, we ensure that they will at - least always be aligned with each other. %> - - <%= link_to( - image_tag( - attachments["avatar.png"].url, - alt: @author, - title: @author - ), - user_url(@author, :host => SERVER_URL), - :target => "_blank" - ) %> - + | + <%= link_to( + image_tag( + attachments["avatar.png"].url, + alt: @author, + title: @author, + width: 50, + height: 50 + ), + user_url(@author, :host => SERVER_URL), + :target => "_blank" + ) %> | <%= body %> |