Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing HTML escape in HTML report of Style/RedundantRegexpArgument #12363

Closed
scivola opened this issue Nov 6, 2023 · 0 comments · Fixed by #12364
Closed

Missing HTML escape in HTML report of Style/RedundantRegexpArgument #12363

scivola opened this issue Nov 6, 2023 · 0 comments · Fixed by #12364
Labels

Comments

@scivola
Copy link

scivola commented Nov 6, 2023

Expected behavior

In an HTML report, every code from the checked scripts must be HTML-escaped.

Actual behavior

In case of Style/RedundantRegexpArgument, not HTML-escaped.

Steps to reproduce the problem

# sample.rb
str.scan(/&</)
str.scan(/<b>/)
% rubocop sample.rb -f html > result.html

Then see result.html.

The result:

FrozenStringLiteralComment

RuboCop version

1.57.2 (using Parser 3.2.2.4, rubocop-ast 1.30.0, running on ruby 3.2.2) [arm64-darwin20]
@koic koic added the bug label Nov 6, 2023
koic added a commit to koic/rubocop that referenced this issue Nov 6, 2023
Fixes rubocop#12363.

This PR fixes incorrect rendering of HTML character entities in `HTMLFormatter` formatter.
koic added a commit that referenced this issue Nov 6, 2023
…ter_html_formatter

[Fix #12363] Fix incorrect rendering in `HTMLFormatter` formatter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants