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

pull/18323/head
Sara Golemon 3 years ago committed by GitHub
parent db01df2dda
commit 336c23336a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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 ")]')
if links.any? { |link| link['href'] == @link_back }
if links.any? { |link| link['href'].downcase == @link_back.downcase }
true
elsif links.empty?
false

Loading…
Cancel
Save