Methods
P
S
T
Instance Public methods
sanitize(text, options = {})
# File actionpack/lib/action_controller/vendor/html-scanner/html/sanitizer.rb, line 7
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 12
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 27
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 17
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