0
0
Fork 0

rel="me" check should be case-insenstive (#32238)

This commit is contained in:
Christian Schmidt 2024-11-21 15:37:25 +01:00 committed by GitHub
parent dbddd40c1c
commit 7385016837
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 30 additions and 3 deletions

View 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