提交 41e218dc 编写于 作者: K Kasper Timm Hansen 提交者: GitHub

Merge pull request #27699 from kenta-s/update-comment-for-scrubber-usage

Update comment for Scrubber usage [ci skip]
......@@ -45,17 +45,15 @@ module SanitizeHelper
# 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 %>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册