From 648d3f3458970f19df1d40badaf638e90531fc29 Mon Sep 17 00:00:00 2001 From: Arpit Jalan Date: Thu, 25 Sep 2014 10:56:23 +0530 Subject: [PATCH] FIX: properly align username for suppressed avatar images --- lib/email/styles.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/email/styles.rb b/lib/email/styles.rb index 2f62084d355..55ab702fd89 100644 --- a/lib/email/styles.rb +++ b/lib/email/styles.rb @@ -140,6 +140,7 @@ module Email def strip_avatars_and_emojis @fragment.css('img').each do |img| if img['src'] =~ /user_avatar/ + img.parent['style'] = "vertical-align: top;" if img.parent.name == 'td' img.remove end @@ -188,7 +189,7 @@ module Email end def reset_tables - style('table',nil, cellspacing: '0', cellpadding: '0', border: '0') + style('table', nil, cellspacing: '0', cellpadding: '0', border: '0') end def style(selector, style, attribs = {})