FIX: ensure we never send elided content via email

This commit is contained in:
Régis Hanol
2018-02-08 00:01:11 +01:00
parent 6a5dad0b86
commit 3b06e5502b
2 changed files with 15 additions and 5 deletions

View File

@ -13,7 +13,7 @@ after_initialize do
Email::Styles.register_plugin_style do |fragment|
# remove all elided content
fragment.css("details.elided").each { |d| d.remove }
fragment.css("details.elided").each(&:remove)
# replace all details with their summary in emails
fragment.css("details").each do |details|
@ -28,4 +28,8 @@ after_initialize do
end
end
on(:reduce_cooked) do |fragment|
fragment.css("details.elided").each(&:remove)
end
end