Skip to content

test failures against current loofah/nokogiri #111

Closed
@terceiro

Description

@terceiro
$ bundle list
Gems included by the bundle:
  * activesupport (6.1.2.1)
  * concurrent-ruby (1.1.8)
  * crass (1.0.6)
  * i18n (1.8.9)
  * loofah (2.9.0)
  * mini_portile2 (2.5.0)
  * minitest (5.14.3)
  * nokogiri (1.11.1)
  * racc (1.5.2)
  * rails-dom-testing (2.0.3)
  * rails-html-sanitizer (1.3.0)
  * rake (13.0.3)
  * tzinfo (2.0.4)
  * zeitwerk (2.4.2)
Use `bundle info` to print more detailed information about a gem
$ bundle exec rake
/usr/lib/ruby-standalone/bin/ruby -w -I"lib" /home/terceiro/.ruby-standalone/gems/ruby/2.7.0/gems/rake-13.0.3/lib/rake/rake_test_loader.rb "test/sanitizer_test.rb" "test/scrubbers_test.rb" 
Run options: --seed 28994

# Running:

..........F.......................................................................F...............................................................................................................................................................................................................................

Finished in 0.130447s, 2345.7817 runs/s, 2476.1029 assertions/s.

  1) Failure:
SanitizersTest#test_should_sanitize_div_background_image_unicode_encoded [/tmp/rails-html-sanitizer/test/sanitizer_test.rb:417]:
--- expected
+++ actual
@@ -1,3 +1,3 @@
-# encoding: UTF-8
+# encoding: ASCII-8BIT
 #    valid: true
-""
+"background-image:\a 5 \a 2 \x06 \x02 8 \x02 9;"


  2) Failure:
SanitizersTest#test_scrub_style_if_style_attribute_option_is_passed [/tmp/rails-html-sanitizer/test/sanitizer_test.rb:274]:
--- expected
+++ actual
@@ -1,3 +1,3 @@
 # encoding: UTF-8
 #    valid: true
-"<p style=\"color: #000;\"></p>"
+"<p style=\"color:#000;\"></p>"


306 runs, 323 assertions, 2 failures, 0 errors, 0 skips
rake aborted!
Command failed with status (1): [ruby -w -I"lib" /home/terceiro/.ruby-standalone/gems/ruby/2.7.0/gems/rake-13.0.3/lib/rake/rake_test_loader.rb "test/sanitizer_test.rb" "test/scrubbers_test.rb" ]
/home/terceiro/.ruby-standalone/gems/ruby/2.7.0/gems/rake-13.0.3/exe/rake:27:in `<top (required)>'
Tasks: TOP => default => test
(See full trace by running task with --trace)

failure 2) is trivial to fix; but failure 1) is more involved. The project CI is currently broken with these exact same failures.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions