Remove html tags from string in controller, how?

Been searching for a function that can do this, but have onl found a
helper function.

is there a way to strip all html tags of a string in a controller?

Thanks

paul wrote:

Been searching for a function that can do this, but have onl found a
helper function.

is there a way to strip all html tags of a string in a controller?

Thanks

This should work

class SomeController < AC::B
include ActionView::Helpers::TextHelper

def foo
  @escaped_string = strip_tags('<h1>Foo</h1>')
end

end

cool, thanks :slight_smile: