From 729bbcaca79dfe668c0c413f38a04ccf1c3c803c Mon Sep 17 00:00:00 2001 From: Christian Schmidt Date: Tue, 8 Oct 2024 19:40:32 +0200 Subject: [PATCH] Performance --- app/services/verify_link_service.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/services/verify_link_service.rb b/app/services/verify_link_service.rb index 5a1adf545a..09964026f8 100644 --- a/app/services/verify_link_service.rb +++ b/app/services/verify_link_service.rb @@ -26,7 +26,7 @@ class VerifyLinkService < BaseService def link_back_present? return false if @body.blank? - links = Nokogiri::HTML5(@body).xpath('(//a|//link)[nokogiri:link_rel_include(@rel, "me")]', NokogiriHandler) + links = Nokogiri::HTML5(@body).xpath('(//a|//link)[@rel][nokogiri:link_rel_include(@rel, "me")]', NokogiriHandler) if links.any? { |link| link['href']&.downcase == @link_back.downcase } true