Method: String#strip_html

Defined in:
lib/wcc.rb

#strip_htmlString

Remove all HTML tags with at least one character name and decode all HTML entities into utf-8 characters.

Returns:

  • (String)

    stripped string



36
37
38
# File 'lib/wcc.rb', line 36

def strip_html
	HTMLEntities.new.decode(self.gsub(/<[^>]+>/, ' '))
end