about summary refs log tree commit diff
path: root/app/services/fetch_link_card_service.rb
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2019-11-23 19:03:01 +0100
committerThibaut Girka <thib@sitedethib.com>2019-11-23 19:03:01 +0100
commitc0f7e21685bbb6b40fdb6f042b8a7ec1054178f2 (patch)
treeac404a0b3326b9187967128058fc52d5bbacb3c3 /app/services/fetch_link_card_service.rb
parent55f5e81a9dc4c6cede5d43e549061be2ea9be614 (diff)
parent054ef83fc5808596643dd366286b4e85446b850c (diff)
Merge branch 'master' into glitch-soc/merge-upstream
Diffstat (limited to 'app/services/fetch_link_card_service.rb')
-rw-r--r--app/services/fetch_link_card_service.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/services/fetch_link_card_service.rb b/app/services/fetch_link_card_service.rb
index 29880e8d8..5d4a7c303 100644
--- a/app/services/fetch_link_card_service.rb
+++ b/app/services/fetch_link_card_service.rb
@@ -67,7 +67,7 @@ class FetchLinkCardService < BaseService
     else
       html  = Nokogiri::HTML(@status.text)
       links = html.css('a')
-      urls  = links.map { |a| Addressable::URI.parse(a['href']).normalize unless skip_link?(a) }.compact
+      urls  = links.map { |a| Addressable::URI.parse(a['href']) unless skip_link?(a) }.compact.map(&:normalize).compact
     end
 
     urls.reject { |uri| bad_url?(uri) }.first