The class of `CGI.escapeHTML` result
Open
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 55
- Forks
- 33
- Avg merge
- 7d 3h
- Merged PRs (30d)
- 1
Description
The class of CGI.escapeHTML result is not consistent for escaped/non-escaped cases.
require 'cgi/escape'
class S<String;end
p %w[a &].map {|c|[c, CGI.escapeHTML(S.new(c)).class]}.to_h #=> {"a"=>S, "&"=>String}
Probably, should be String always?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the CGI.escapeHTML entry point shown in the issue and reproduce the example with a String subclass. Determine the expected result class for escaped and unescaped inputs, then add or update coverage so both cases are consistent.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100