Created
December 5, 2008 21:47
-
-
Save mndoci/32523 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# From Euan's blog post | |
# http://www.ghastlyfop.com/blog/2008/12/strip-html-tags-from-string-ruby.html | |
require 'hpricot' | |
page = Hpricot("<b>some marked up <i>text</i></b>") | |
puts page.to_plain_text |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment