diff --git a/lib/oga/xml/lexer.rb b/lib/oga/xml/lexer.rb index dabbbaf..4c38c50 100644 --- a/lib/oga/xml/lexer.rb +++ b/lib/oga/xml/lexer.rb @@ -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 diff --git a/lib/oga/xml/text.rb b/lib/oga/xml/text.rb index a9eb796..a6bbb50 100644 --- a/lib/oga/xml/text.rb +++ b/lib/oga/xml/text.rb @@ -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