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
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
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs