Skip to content

Instantly share code, notes, and snippets.

@jasonreposa
Created April 30, 2012 18:51
Show Gist options
  • Save jasonreposa/2561185 to your computer and use it in GitHub Desktop.
Save jasonreposa/2561185 to your computer and use it in GitHub Desktop.
html = Nokogiri::HTML(the_content)
...
html.xpath("//ul[@id='sharebar']").each(&:remove)
html.xpath('//script').each(&:remove)
html.xpath('//@onclick').each(&:remove)
html.xpath('//@class').each(&:remove)
html.xpath('//@style').each(&:remove)
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment