mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 22:43:33 +08:00
FIX: Provide the ability to reduce
cooked content
This allows us to strip polls from the group posts page.
This commit is contained in:
@ -390,8 +390,9 @@ module PrettyText
|
||||
doc.css(".lightbox-wrapper .meta").remove
|
||||
end
|
||||
|
||||
def self.format_for_email(html)
|
||||
def self.format_for_email(html, post = nil)
|
||||
doc = Nokogiri::HTML.fragment(html)
|
||||
DiscourseEvent.trigger(:reduce_cooked, doc, post)
|
||||
make_all_links_absolute(doc)
|
||||
strip_image_wrapping(doc)
|
||||
doc.to_html
|
||||
|
Reference in New Issue
Block a user