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 = {})
40
40
end
41
41
42
42
# === 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.
44
44
#
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.'
48
49
class LinkSanitizer < Sanitizer
49
50
def initialize
50
51
@link_scrubber = TargetScrubber . new
You can’t perform that action at this time.
0 commit comments