Merge pull request #2930 from techAPJ/patch-2
optimize detecting avatar image logic
This commit is contained in:
commit
e7b39be194
|
@ -155,7 +155,7 @@ module Email
|
||||||
|
|
||||||
def strip_avatars_and_emojis
|
def strip_avatars_and_emojis
|
||||||
@fragment.css('img').each do |img|
|
@fragment.css('img').each do |img|
|
||||||
if img['src'] =~ /user_avatar/ || img['src'] =~ /letter_avatar/
|
if img['src'] =~ /_avatar/
|
||||||
img.parent['style'] = "vertical-align: top;" if img.parent.name == 'td'
|
img.parent['style'] = "vertical-align: top;" if img.parent.name == 'td'
|
||||||
img.remove
|
img.remove
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue