Renamed one function.
This commit is contained in:
parent
0012efcfb4
commit
86a7577975
|
@ -106,7 +106,7 @@ module HTML5lib
|
||||||
ALLOWED_SVG_PROPERTIES = ACCEPTABLE_SVG_PROPERTIES
|
ALLOWED_SVG_PROPERTIES = ACCEPTABLE_SVG_PROPERTIES
|
||||||
ALLOWED_PROTOCOLS = ACCEPTABLE_PROTOCOLS
|
ALLOWED_PROTOCOLS = ACCEPTABLE_PROTOCOLS
|
||||||
|
|
||||||
def process_token(token)
|
def sanitize_token(token)
|
||||||
case token[:type]
|
case token[:type]
|
||||||
when :StartTag, :EndTag, :EmptyTag
|
when :StartTag, :EndTag, :EmptyTag
|
||||||
if ALLOWED_ELEMENTS.include?(token[:name])
|
if ALLOWED_ELEMENTS.include?(token[:name])
|
||||||
|
@ -176,7 +176,7 @@ module HTML5lib
|
||||||
include HTMLSanitizeModule
|
include HTMLSanitizeModule
|
||||||
def each
|
def each
|
||||||
@source.each do |token|
|
@source.each do |token|
|
||||||
yield(process_token(token))
|
yield(sanitize_token(token))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -185,7 +185,7 @@ module HTML5lib
|
||||||
include HTMLSanitizeModule
|
include HTMLSanitizeModule
|
||||||
def each
|
def each
|
||||||
super do |token|
|
super do |token|
|
||||||
yield(process_token(token))
|
yield(sanitize_token(token))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue