mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: some blank topics and posts in summary email because they're images
This commit is contained in:
@@ -48,9 +48,9 @@ module UserNotificationsHelper
|
||||
doc.css('div').first
|
||||
end
|
||||
|
||||
def email_excerpt(html, posts_count=nil)
|
||||
def email_excerpt(html_arg, posts_count=nil)
|
||||
# only include 1st paragraph when more than 1 posts
|
||||
html = first_paragraph_from(html).to_s if posts_count.nil? || posts_count > 1
|
||||
html = (posts_count.nil? || posts_count > 1) ? (first_paragraph_from(html_arg)||html_arg).to_s : html_arg
|
||||
PrettyText.format_for_email(html).html_safe
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user