Performance

This commit is contained in:
Christian Schmidt 2024-10-08 19:40:32 +02:00
parent fad9212def
commit 729bbcaca7

View file

@ -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