Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/wcc.rb
Instance Method Summary collapse
-
#strip_html ⇒ String
Remove all HTML tags with at least one character name and decode all HTML entities into utf-8 characters.
Instance Method Details
#strip_html ⇒ String
Remove all HTML tags with at least one character name and decode all HTML entities into utf-8 characters.
31 32 33 |
# File 'lib/wcc.rb', line 31 def strip_html HTMLEntities.new.decode(self.gsub(/<[^>]+>/, ' ')) end |