aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKasper Timm Hansen <kaspth@gmail.com>2017-01-16 15:57:51 +0100
committerGitHub <noreply@github.com>2017-01-16 15:57:51 +0100
commit41e218dcabff0fef6d0728378c12923c40570465 (patch)
tree7ab9d2bef5a137ed89053dc93b0b6c8d183af744
parentf5d66cb3e5fc48c89c41c522804b70f3e5fcbc47 (diff)
parentf602cc9ccd7424c7b5f3d05d0416de4ba9dd163b (diff)
downloadrails-41e218dcabff0fef6d0728378c12923c40570465.tar.gz
rails-41e218dcabff0fef6d0728378c12923c40570465.tar.bz2
rails-41e218dcabff0fef6d0728378c12923c40570465.zip
Merge pull request #27699 from kenta-s/update-comment-for-scrubber-usage
Update comment for Scrubber usage [ci skip]
-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 %>