Class: CommentScrubber

Inherits:
Rails::Html::PermitScrubber
  • Object
show all
Defined in:
/var/apps/qpixel/app/helpers/comments_helper.rb

Overview

HTML sanitizer for use with comments.

Instance Method Summary collapse

Constructor Details

#initializeCommentScrubber

Returns a new instance of CommentScrubber.



197
198
199
200
201
# File '/var/apps/qpixel/app/helpers/comments_helper.rb', line 197

def initialize
  super
  self.tags = %w[a b i em strong s strike del pre code p blockquote span sup sub br ul ol li]
  self.attributes = %w[href title lang dir id class start]
end

Instance Method Details

#skip_node?(node) ⇒ Boolean

Returns:

  • (Boolean)


203
204
205
# File '/var/apps/qpixel/app/helpers/comments_helper.rb', line 203

def skip_node?(node)
  node.text?
end