Use Whitelist for LITERAL_HTML_ELEMENTS

This commit is contained in:
Yorick Peterse committed 2015-05-17 21:56:38 +02:00
1 parent ca16a2976e
commit 596a9b18d6
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -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
+1 -1
View File
@@ -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