diff options
author | ThibG <thib@sitedethib.com> | 2019-11-24 00:36:35 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-24 00:36:35 +0100 |
commit | 2448568d341dcf288bf004826666ab9010601b47 (patch) | |
tree | 2df762b1b6d46f64f97991a70267d96a4509cdd1 /app/services/fetch_link_card_service.rb | |
parent | 55f5e81a9dc4c6cede5d43e549061be2ea9be614 (diff) | |
parent | 271b2e68f33e8086eb4a1ee44694fcd2ecd7ab07 (diff) |
Merge pull request #1247 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/services/fetch_link_card_service.rb')
-rw-r--r-- | app/services/fetch_link_card_service.rb | 2 |
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 |