File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -40,11 +40,12 @@ def sanitize(html, options = {})
4040 end
4141
4242 # === Rails::Html::LinkSanitizer
43- # Removes a tags and href attributes leaving only the link text
43+ # Removes +a+ tags and + href+ attributes leaving only the link text.
4444 #
45- # link_sanitizer = Rails::Html::LinkSanitizer.new
46- # link_sanitizer.sanitize('<a href="example.com">Only the link text will be kept.</a>')
47- # # => Only the link text will be kept.
45+ # link_sanitizer = Rails::Html::LinkSanitizer.new
46+ # link_sanitizer.sanitize('<a href="example.com">Only the link text will be kept.</a>')
47+ #
48+ # => 'Only the link text will be kept.'
4849 class LinkSanitizer < Sanitizer
4950 def initialize
5051 @link_scrubber = TargetScrubber . new
You can’t perform that action at this time.
0 commit comments