mirror of
https://github.com/discourse/discourse.git
synced 2025-09-08 12:06:51 +08:00
FIX: ensure we never send elided content via email
This commit is contained in:
parent
6a5dad0b86
commit
3b06e5502b
2 changed files with 15 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue