Sign in through GitHub

Please read for an updated status on RailsCasts:

Learn more or hide this

Ian Mitchell's Profile

GitHub User: IanMitchell

Site: http://blog.centasm.net

Comments by Ian Mitchell

Avatar

Nokogiri does that by default when using the ::HTML call. You need to use .fragment

doc = Nokogiri::HTML.fragment(html)