mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 13:09:18 +08:00
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:
parent
b7c680853d
commit
48c3172913
|
@ -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:
|
||||
|
|
|
@ -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']
|
||||
|
|
Loading…
Reference in New Issue
Block a user