Class: PostsHelper::PostScrubber
- Inherits:
-
Rails::Html::PermitScrubber
- Object
- Rails::Html::PermitScrubber
- PostsHelper::PostScrubber
- Defined in:
- app/helpers/posts_helper.rb
Instance Method Summary collapse
-
#initialize ⇒ PostScrubber
constructor
A new instance of PostScrubber.
- #skip_node?(node) ⇒ Boolean
Constructor Details
#initialize ⇒ PostScrubber
Returns a new instance of PostScrubber.
67 68 69 70 71 72 73 |
# File 'app/helpers/posts_helper.rb', line 67 def initialize super # IF YOU CHANGE THESE VALUES YOU MUST ALSO CHANGE app/assets/javascripts/posts.js self. = %w[a p span b i em strong hr h1 h2 h3 h4 h5 h6 blockquote img strike del code pre br ul ol li sup sub section details summary ins table thead tbody tr th td s] self.attributes = %w[id class href title src height width alt rowspan colspan lang start dir] end |
Instance Method Details
#skip_node?(node) ⇒ Boolean
75 76 77 |
# File 'app/helpers/posts_helper.rb', line 75 def skip_node?(node) node.text? end |