RailsCasts Pro episodes are now free!

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)