mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
FIX: properly align username for suppressed avatar images
This commit is contained in:
parent
239d4d9d47
commit
648d3f3458
1 changed files with 2 additions and 1 deletions
|
@ -140,6 +140,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/
|
if img['src'] =~ /user_avatar/
|
||||||
|
img.parent['style'] = "vertical-align: top;" if img.parent.name == 'td'
|
||||||
img.remove
|
img.remove
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -188,7 +189,7 @@ module Email
|
||||||
end
|
end
|
||||||
|
|
||||||
def reset_tables
|
def reset_tables
|
||||||
style('table',nil, cellspacing: '0', cellpadding: '0', border: '0')
|
style('table', nil, cellspacing: '0', cellpadding: '0', border: '0')
|
||||||
end
|
end
|
||||||
|
|
||||||
def style(selector, style, attribs = {})
|
def style(selector, style, attribs = {})
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue