mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: extract links in post processor
when oneboxes are not cached or are refreshed they can introduce new links, these links must be extracted otherwise you can not follow them
This commit is contained in:
@@ -29,9 +29,16 @@ class CookedPostProcessor
|
||||
optimize_urls
|
||||
pull_hotlinked_images(bypass_bump)
|
||||
grant_badges
|
||||
extract_links
|
||||
end
|
||||
end
|
||||
|
||||
# onebox may have added some links, so extract them now
|
||||
def extract_links
|
||||
TopicLink.extract_from(@post)
|
||||
QuotedPost.extract_from(@post)
|
||||
end
|
||||
|
||||
def has_emoji?
|
||||
(@doc.css("img.emoji") - @doc.css(".quote img")).size > 0
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user