Methods
P
S
T
Instance Public methods
sanitize(text, options = {})
# File actionpack/lib/action_controller/vendor/html-scanner/html/sanitizer.rb, line 3
def sanitize(text, options = {})
  return text unless sanitizeable?(text)
  tokenize(text, options).join
end
sanitizeable?(text)
# File actionpack/lib/action_controller/vendor/html-scanner/html/sanitizer.rb, line 8
def sanitizeable?(text)
  !(text.nil? || text.empty? || !text.index("<"))
end
Instance Protected methods
process_node(node, result, options)
# File actionpack/lib/action_controller/vendor/html-scanner/html/sanitizer.rb, line 23
def process_node(node, result, options)
  result << node.to_s
end
tokenize(text, options)
# File actionpack/lib/action_controller/vendor/html-scanner/html/sanitizer.rb, line 13
def tokenize(text, options)
  tokenizer = HTML::Tokenizer.new(text)
  result = []
  while token = tokenizer.next
    node = Node.parse(nil, 0, 0, token, false)
    process_node node, result, options
  end
  result
end