DEV: Remove preserve_email_structure_when_styling setting (#10956)

This was made adjustable to allow rolling back quickly if problems came
up. The new behaviour was made default in 93137066 and no problems with
this have been reported.
This commit is contained in:
Daniel Waterworth 2020-10-19 12:19:30 +01:00 committed by GitHub
parent b7c680853d
commit 48c3172913
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 12 deletions

View File

@ -1186,9 +1186,6 @@ email:
client: true
default: true
hidden: true
preserve_email_structure_when_styling:
default: true
hidden: true
files:
max_image_size_kb:

View File

@ -271,21 +271,13 @@ module Email
strip_classes_and_ids
replace_relative_urls
if SiteSetting.preserve_email_structure_when_styling
@fragment.to_html
else
include_body? ? @fragment.at("body").to_html : @fragment.at("body").children.to_html
end
@fragment.to_html
end
def to_s
@fragment.to_s
end
def include_body?
@html =~ /<body>/i
end
def strip_avatars_and_emojis
@fragment.search('img').each do |img|
next unless img['src']