about summary refs log tree commit diff
diff options
context:
space:
mode:
authornightpool <nightpool@users.noreply.github.com>2019-10-24 16:46:15 -0400
committerEugen Rochko <eugen@zeonfederated.com>2019-10-24 22:46:15 +0200
commit9762fe382c76fdff5281a94f484191a92d09eac7 (patch)
treeb40d29c60c6e2b3613462bfdd8293aff493439c4
parent3ebd903535be4ea33d2187e08470892417f87c02 (diff)
microformat mentions can have an implicit property (#12189)
See the first example here: http://microformats.org/wiki/microformats2#hyperlinked_person
-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 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