for jruby make sure content is read before passing to nokogiri