Method: String#strip_html
- Defined in:
- lib/wcc.rb
#strip_html ⇒ String
Remove all HTML tags with at least one character name and decode all HTML entities into utf-8 characters.
36 37 38 |
# File 'lib/wcc.rb', line 36 def strip_html HTMLEntities.new.decode(self.gsub(/<[^>]+>/, ' ')) end |