aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/lib/action_view/helpers/sanitize_helper.rb
diff options
context:
space:
mode:
authorkenta-s <knt01222@gmail.com>2017-01-16 20:25:47 +0900
committerkenta-s <knt01222@gmail.com>2017-01-16 20:25:47 +0900
commitf602cc9ccd7424c7b5f3d05d0416de4ba9dd163b (patch)
treee326a5e7178f6cfa96b23e328069db813dd098a8 /actionview/lib/action_view/helpers/sanitize_helper.rb
parent88daf5dee4aa09bbefe736ca6d379c89b0927272 (diff)
downloadrails-f602cc9ccd7424c7b5f3d05d0416de4ba9dd163b.tar.gz
rails-f602cc9ccd7424c7b5f3d05d0416de4ba9dd163b.tar.bz2
rails-f602cc9ccd7424c7b5f3d05d0416de4ba9dd163b.zip
Update comment for Scrubber usage [ci skip]
Diffstat (limited to 'actionview/lib/action_view/helpers/sanitize_helper.rb')
-rw-r--r--actionview/lib/action_view/helpers/sanitize_helper.rb10
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 %>