mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: omit images from og and twitter description tags
This commit is contained in:
@@ -169,10 +169,10 @@ class TopicView
|
||||
@desired_post
|
||||
end
|
||||
|
||||
def summary
|
||||
def summary(opts = {})
|
||||
return nil if desired_post.blank?
|
||||
# TODO, this is actually quite slow, should be cached in the post table
|
||||
excerpt = desired_post.excerpt(500, strip_links: true, text_entities: true)
|
||||
excerpt = desired_post.excerpt(500, opts.merge(strip_links: true, text_entities: true))
|
||||
(excerpt || "").gsub(/\n/, ' ').strip
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user