class Rails::Html::TextOnlyScrubber
Unallowed elements will be stripped, i.e. element is removed but its subtree kept.Rails::Html::TextOnlyScrubber
allows you to permit text nodes.
=== Rails::Html::TextOnlyScrubber
def initialize
def initialize @direction = :bottom_up end
def scrub(node)
def scrub(node) if node.text? CONTINUE else node.before node.children node.remove end end