This project is archived. Its data is read-only.

Html parsing fails with 'LL::ParserError: Unexpected end of input, expected element closing tag'

I'm trying to parse a html file.

require 'httpclient'
require 'oga'

url = 'http://stackoverflow.com/questions/19570656/rspec-jruby-out-of-memory-exception'
c = HTTPClient.new
content = c.get_content(url)
document = Oga.parse_html content 

Gives me the error:


» ruby test.rb                                                                                                                                                                     [12:42:15]
LL::ParserError: Unexpected end of input, expected element closing tag instead on line 426
  parser_error at /home/binaryplease/.rvm/gems/jruby-1.7.19/gems/oga-0.3.1-java/lib/oga/xml/parser.rb:255
    each_token at /home/binaryplease/.rvm/gems/jruby-1.7.19/gems/oga-0.3.1-java/lib/oga/xml/parser.rb:231
         parse at org/libll/Driver.java:303
         parse at /home/binaryplease/.rvm/gems/jruby-1.7.19/gems/oga-0.3.1-java/lib/oga/xml/parser.rb:262
    parse_html at /home/binaryplease/.rvm/gems/jruby-1.7.19/gems/oga-0.3.1-java/lib/oga/oga.rb:25
        (root) at test.rb:7
Assignee Loading
Time tracking Loading