Decode IDNA in PreviewCard (#2781)
This commit is contained in:
parent
e37e84d210
commit
e95983f5df
5 changed files with 23 additions and 7 deletions
|
@ -11,6 +11,7 @@ class FetchLinkCardService < BaseService
|
|||
|
||||
return if url.nil?
|
||||
|
||||
url = Addressable::URI.parse(url).normalize.to_s
|
||||
card = PreviewCard.where(status: status).first_or_initialize(status: status, url: url)
|
||||
attempt_opengraph(card, url) unless attempt_oembed(card, url)
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue