Skip to content

Instantly share code, notes, and snippets.

@kinopyo
Created February 15, 2012 04:03
Show Gist options
  • Save kinopyo/1833094 to your computer and use it in GitHub Desktop.
Save kinopyo/1833094 to your computer and use it in GitHub Desktop.
Nokogiri remove all image tags
f = Nokogiri::XML.fragment(some_html_str)
f.search('.//img').remove
puts f.to_html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment