Skip to content
Browse files

Remove html tags via nokogiri.

  • Loading branch information...
1 parent 51cb479 commit fbe7bf5c44e8fa2171296ed26f75609b6d9073e6 @eguitarz eguitarz committed Apr 6, 2012
Showing with 3 additions and 0 deletions.
  1. +3 −0 lib/readability.rb
View
3 lib/readability.rb
@@ -46,6 +46,9 @@ def prepare_candidates
def make_html
@html = Nokogiri::HTML(@input, nil, @options[:encoding])
+
+ # Remove html comment tags
+ @html.xpath('//comment()').each { |i| i.remove }
end
def images(content=nil, reload=false)

0 comments on commit fbe7bf5

Please sign in to comment.
Something went wrong with that request. Please try again.