about summary refs log tree commit diff
path: root/app/services/fetch_link_card_service.rb
diff options
context:
space:
mode:
authorYamagishi Kazutoshi <ykzts@desire.sh>2017-05-04 22:52:08 +0900
committerEugen Rochko <eugen@zeonfederated.com>2017-05-04 15:52:08 +0200
commite95983f5dfe8fba7852a6ac1a42c2048e83db03d (patch)
tree3f87db9f9c035d34f650cf369200e4e61243796a /app/services/fetch_link_card_service.rb
parente37e84d210226594bfa0e247223fde540eb48cab (diff)
Decode IDNA in PreviewCard (#2781)
Diffstat (limited to 'app/services/fetch_link_card_service.rb')
-rw-r--r--app/services/fetch_link_card_service.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/services/fetch_link_card_service.rb b/app/services/fetch_link_card_service.rb
index 416c5fdad..524b66626 100644
--- a/app/services/fetch_link_card_service.rb
+++ b/app/services/fetch_link_card_service.rb
@@ -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