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
12
app/lib/nokogiri_handler.rb
Normal file
12
app/lib/nokogiri_handler.rb
Normal file
|
@ -0,0 +1,12 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class NokogiriHandler
|
||||
class << self
|
||||
# See "set of space-separated tokens" in the HTML5 spec.
|
||||
WHITE_SPACE = /[ \x09\x0A\x0C\x0D]+/
|
||||
|
||||
def link_rel_include(token_list, token)
|
||||
token_list.to_s.downcase.split(WHITE_SPACE).include?(token.downcase)
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue