Use Whitelist for LITERAL_HTML_ELEMENTS
This commit is contained in:
parent
ca16a2976e
commit
596a9b18d6
|
@ -87,7 +87,7 @@ module Oga
|
|||
##
|
||||
# Names of HTML tags of which the content should be lexed as-is.
|
||||
#
|
||||
LITERAL_HTML_ELEMENTS = NodeNameSet.new([HTML_SCRIPT, HTML_STYLE])
|
||||
LITERAL_HTML_ELEMENTS = Whitelist.new([HTML_SCRIPT, HTML_STYLE])
|
||||
|
||||
##
|
||||
# @param [String|IO] data The data to lex. This can either be a String or
|
||||
|
|
|
@ -59,7 +59,7 @@ module Oga
|
|||
node = parent
|
||||
|
||||
return node.is_a?(Element) && html? &&
|
||||
Lexer::LITERAL_HTML_ELEMENTS.include?(node.name)
|
||||
Lexer::LITERAL_HTML_ELEMENTS.allow?(node.name)
|
||||
end
|
||||
end # Text
|
||||
end # XML
|
||||
|
|
Loading…
Reference in New Issue