cantino / ruby-readability

Port of arc90's readability project to Ruby
Apache License 2.0
919 stars 170 forks source link

Failing tests on Ruby 3.0 (invalid byte sequence in UTF-8) #87

Open andyw8 opened 3 years ago

andyw8 commented 3 years ago
Failures:

  1) Readability images should show one image, but outside of the best candidate
     Failure/Error: @input = @input.gsub(REGEXES[:replaceBrsRe], '</p><p>').gsub(REGEXES[:replaceFontsRe], '<\1span>')

     ArgumentError:
       invalid byte sequence in UTF-8
     # ./lib/readability.rb:48:in `gsub'
     # ./lib/readability.rb:48:in `initialize'
     # ./spec/readability_spec.rb:79:in `new'
     # ./spec/readability_spec.rb:79:in `block (3 levels) in <top (required)>'

  2) Readability the cant_read.html fixture should work on the cant_read.html fixture with some allowed tags
     Failure/Error: @input = @input.gsub(REGEXES[:replaceBrsRe], '</p><p>').gsub(REGEXES[:replaceFontsRe], '<\1span>')

     ArgumentError:
       invalid byte sequence in UTF-8
     # ./lib/readability.rb:48:in `gsub'
     # ./lib/readability.rb:48:in `initialize'
     # ./spec/readability_spec.rb:386:in `new'
     # ./spec/readability_spec.rb:386:in `block (3 levels) in <top (required)>'

Finished in 0.87143 seconds (files took 0.28091 seconds to load)
49 examples, 2 failures