We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2523282 commit 5d735a7Copy full SHA for 5d735a7
lib/rails/html/sanitizer.rb
@@ -40,11 +40,12 @@ def sanitize(html, options = {})
40
end
41
42
# === Rails::Html::LinkSanitizer
43
- # Removes a tags and href attributes leaving only the link text
+ # Removes +a+ tags and +href+ attributes leaving only the link text.
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.
+ # link_sanitizer = Rails::Html::LinkSanitizer.new
+ # link_sanitizer.sanitize('<a href="example.com">Only the link text will be kept.</a>')
+ #
48
+ # => 'Only the link text will be kept.'
49
class LinkSanitizer < Sanitizer
50
def initialize
51
@link_scrubber = TargetScrubber.new
0 commit comments