Allow VerifyLinkService to accept backlinks with differing case (#18320)

lolsob-rspec
Sara Golemon 2022-05-05 17:41:42 -05:00 committed by GitHub
parent cde543ac9c
commit 7c1bd95c9b
1 changed files with 1 additions and 1 deletions

View File

@ -28,7 +28,7 @@ class VerifyLinkService < BaseService
links = Nokogiri::HTML(@body).xpath('//a[contains(concat(" ", normalize-space(@rel), " "), " me ")]|//link[contains(concat(" ", normalize-space(@rel), " "), " me ")]') links = Nokogiri::HTML(@body).xpath('//a[contains(concat(" ", normalize-space(@rel), " "), " me ")]|//link[contains(concat(" ", normalize-space(@rel), " "), " me ")]')
if links.any? { |link| link['href'] == @link_back } if links.any? { |link| link['href'].downcase == @link_back.downcase }
true true
elsif links.empty? elsif links.empty?
false false