Class: CommentScrubber
- Inherits:
-
Rails::Html::PermitScrubber
- Object
- Rails::Html::PermitScrubber
- CommentScrubber
- Defined in:
- /var/apps/qpixel/app/helpers/comments_helper.rb
Overview
HTML sanitizer for use with comments.
Instance Method Summary collapse
-
#initialize ⇒ CommentScrubber
constructor
A new instance of CommentScrubber.
- #skip_node?(node) ⇒ Boolean
Constructor Details
#initialize ⇒ CommentScrubber
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. = %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
203 204 205 |
# File '/var/apps/qpixel/app/helpers/comments_helper.rb', line 203 def skip_node?(node) node.text? end |