diff --git a/README.md b/README.md index 371a0ac..5a6ffc2 100644 --- a/README.md +++ b/README.md @@ -99,17 +99,15 @@ You can also create custom scrubbers in your application if you want to. ```ruby class CommentScrubber < Rails::Html::PermitScrubber - def allowed_node?(node) - !%w(form script comment blockquote).include?(node.name) + def initialize + super + self.tags = %w( form script comment blockquote ) + self.attributes = %w( style ) end def skip_node?(node) node.text? end - - def scrub_attribute?(name) - name == "style" - end end ```