FIX: Provide the ability to reduce cooked content

This allows us to strip polls from the group posts page.
This commit is contained in:
Robin Ward
2016-04-13 13:24:39 -04:00
parent 8fcd359e2a
commit e91379916b
5 changed files with 25 additions and 19 deletions

View File

@ -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