From: nightpool Date: Thu, 24 Oct 2019 20:46:15 +0000 (-0400) Subject: microformat mentions can have an implicit property (#12189) X-Git-Url: https://git.xn--scling-oua.cat.family/?a=commitdiff_plain;h=9762fe382c76fdff5281a94f484191a92d09eac7;p=mastodon.git microformat mentions can have an implicit property (#12189) See the first example here: http://microformats.org/wiki/microformats2#hyperlinked_person --- diff --git a/app/services/fetch_link_card_service.rb b/app/services/fetch_link_card_service.rb index f0b1169db..640c60fd4 100644 --- a/app/services/fetch_link_card_service.rb +++ b/app/services/fetch_link_card_service.rb @@ -84,7 +84,7 @@ class FetchLinkCardService < BaseService def skip_link?(a) # Avoid links for hashtags and mentions (microformats) - a['rel']&.include?('tag') || a['class']&.include?('u-url') || mention_link?(a) + a['rel']&.include?('tag') || a['class']&.match?(/u-url|h-card/) || mention_link?(a) end def attempt_oembed