rel="me"
check should be case-insenstive (#32238)
This commit is contained in:
parent
dbddd40c1c
commit
7385016837
5 changed files with 30 additions and 3 deletions
|
@ -26,7 +26,7 @@ class VerifyLinkService < BaseService
|
|||
def link_back_present?
|
||||
return false if @body.blank?
|
||||
|
||||
links = Nokogiri::HTML5(@body).css("a[rel~='me'],link[rel~='me']")
|
||||
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue