class Rails::HTML4::LinkSanitizer
Rails::HTML4::LinkSanitizer
Removes a tags and href attributes from HTML4 leaving only the link text.
link_sanitizer = Rails::HTML4::LinkSanitizer.new link_sanitizer.sanitize('<a href="example.com">Only the link text will be kept.</a>') # => "Only the link text will be kept."