Escaped HTML tags in Ruby 3
Job #3036004478 failed for 19bc60ec:
7) profiles/keys/_key.html.haml when the key partial is used icon tooltip valid: true, expiry: Sat, 17 Sep 2022 20:03:04.165443607 UTC +00:00, result: "" renders the correct icon
Failure/Error:
raise <<~MESSAGE
The following string contains HTML escaped tags:
#{string}
Please consider using `.html_safe`.
This check can be disabled via:
it #{example.description.inspect}, :skip_html_escaped_tags_check do
RuntimeError:
The following string contains HTML escaped tags:
:aa:6d
</span>
</div>
<div class="gl-mt-3">Created«<time» class="js-timeago gl-ml-2" title="
Please consider using `.html_safe`.
This check can be disabled via:
it "renders the correct icon", :skip_html_escaped_tags_check do
...
end
# ./spec/support/shared_contexts/views/html_safe_render_shared_context.rb:24:in `ensure_no_html_escaped_tags!'
# ./spec/support/shared_contexts/views/html_safe_render_shared_context.rb:9:in `block (3 levels) in <main>'
# <internal:kernel>:90:in `tap'
# ./spec/support/shared_contexts/views/html_safe_render_shared_context.rb:6:in `block (2 levels) in <main>'
# ./spec/views/profiles/keys/_key.html.haml_spec.rb:108:in `block (5 levels) in <main>'
# ./spec/spec_helper.rb:416:in `block (3 levels) in <top (required)>'
# ./spec/support/sidekiq_middleware.rb:9:in `with_sidekiq_server_middleware'
# ./spec/spec_helper.rb:407:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:403:in `block (3 levels) in <top (required)>'
# ./lib/gitlab/application_context.rb:56:in `with_raw_context'
# ./spec/spec_helper.rb:403:in `block (2 levels) in <top (required)>'
# ./spec/spec_helper.rb:240:in `block (2 levels) in <top (required)>'
# ./spec/support/system_exit_detected.rb:7:in `block (2 levels) in <main>'
# ./spec/support/flaky_tests.rb:27:in `block (2 levels) in <main>'
# ./spec/support/database/prevent_cross_joins.rb:106:in `block (3 levels) in <main>'
# ./spec/support/database/prevent_cross_joins.rb:60:in `with_cross_joins_prevented'
# ./spec/support/database/prevent_cross_joins.rb:106:in `block (2 levels) in <main>'
Finished in 8.61 seconds (files took 1 minute 12.96 seconds to load)
7 examples, 7 failures
Failed examples:
rspec ./spec/views/profiles/keys/_key.html.haml_spec.rb:21 # profiles/keys/_key.html.haml when the key partial is used displays the correct values
rspec ./spec/views/profiles/keys/_key.html.haml_spec.rb:40 # profiles/keys/_key.html.haml when the key partial is used when the key has not been used renders "Never" for last used
rspec ./spec/views/profiles/keys/_key.html.haml_spec.rb:54 # profiles/keys/_key.html.haml when the key partial is used when the key does not have an expiration date renders "Never" for expires
rspec ./spec/views/profiles/keys/_key.html.haml_spec.rb:64 # profiles/keys/_key.html.haml when the key partial is used when the key has expired renders "Expired:" as the expiration date label
rspec ./spec/views/profiles/keys/_key.html.haml_spec.rb:78 # profiles/keys/_key.html.haml when the key partial is used when the key is not deletable does not render the partial
rspec './spec/views/profiles/keys/_key.html.haml_spec.rb[1:1:6:1:1]' # profiles/keys/_key.html.haml when the key partial is used icon tooltip valid: false, expiry: Sat, 17 Sep 2022 20:03:04.165178627 UTC +00:00, result: "Key type is forbidden. Must be DSA, ECDSA, ED25519, ECDSA_SK, or ED25519_SK" renders the correct icon
rspec './spec/views/profiles/keys/_key.html.haml_spec.rb[1:1:6:2:1]' # profiles/keys/_key.html.haml when the key partial is used icon tooltip valid: true, expiry: Sat, 17 Sep 2022 20:03:04.165443607 UTC +00:00, result: "" renders the correct icon
Screenshot
Refs
Edited by Peter Leitzen