mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 07:53:49 +08:00
FIX: ensure we never send elided content via email
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user