diff options
author | kenta-s <knt01222@gmail.com> | 2017-01-16 20:25:47 +0900 |
---|---|---|
committer | kenta-s <knt01222@gmail.com> | 2017-01-16 20:25:47 +0900 |
commit | f602cc9ccd7424c7b5f3d05d0416de4ba9dd163b (patch) | |
tree | e326a5e7178f6cfa96b23e328069db813dd098a8 /actionview/lib | |
parent | 88daf5dee4aa09bbefe736ca6d379c89b0927272 (diff) | |
download | rails-f602cc9ccd7424c7b5f3d05d0416de4ba9dd163b.tar.gz rails-f602cc9ccd7424c7b5f3d05d0416de4ba9dd163b.tar.bz2 rails-f602cc9ccd7424c7b5f3d05d0416de4ba9dd163b.zip |
Update comment for Scrubber usage [ci skip]
Diffstat (limited to 'actionview/lib')
-rw-r--r-- | actionview/lib/action_view/helpers/sanitize_helper.rb | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/actionview/lib/action_view/helpers/sanitize_helper.rb b/actionview/lib/action_view/helpers/sanitize_helper.rb index 3d6ff598ee..1e9b813d3d 100644 --- a/actionview/lib/action_view/helpers/sanitize_helper.rb +++ b/actionview/lib/action_view/helpers/sanitize_helper.rb @@ -45,17 +45,15 @@ module ActionView # Providing a custom Rails::Html scrubber: # # 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 # # <%= sanitize @comment.body, scrubber: CommentScrubber.new %> |