mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 16:11:08 +08:00
FIX: fail to send email notification if post has img tag with no src attribute
This commit is contained in:
@ -191,8 +191,10 @@ module Email
|
||||
|
||||
def strip_avatars_and_emojis
|
||||
@fragment.search('img').each do |img|
|
||||
next unless img['src']
|
||||
|
||||
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
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user