I\'m trying to call sanitize within a controller. Here\'s what I tried:
sanitize
class FooController < ApplicationController include ActionView::Hel
Rails 6:
To strip links (for example) from a text, just call:
... Rails::Html::LinkSanitizer.new.sanitize("links here will be stripped") ...
see https://github.com/rails/rails-html-sanitizer