mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 09:10:25 +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:
parent
8fcd359e2a
commit
e91379916b
5 changed files with 25 additions and 19 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue