Use URI::RFC2396_PARSER.escape explicitly.
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 125
- Forks
- 65
- Avg merge
- 6h 4m
- Merged PRs (30d)
- 2
Description
warning: URI::RFC3986_PARSER.escape is obsolete. Use URI::RFC2396_PARSER.escape explicitly.
The code I was using was along those lines:
begin
this_webpage = URI.parse(this_webpage)
rescue URI::InvalidURIError
this_webpage = URI.parse(URI::Parser.new.escape(this_webpage))
end
Could you guys clean this up internally? In my own downstream code I never
use either of those two constants, but I do have warnings on, so I notice
this warning. I reckon this may simply be to change towards the other RFC,
but I don't know the URI internals well enough to suggest anything really.
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
Search the URI library for uses of URI::RFC3986_PARSER.escape and URI::Parser.new.escape, then start at the URI.parse fallback that rescues URI::InvalidURIError. The change is done when the obsolete warning no longer appears while escaping invalid input continues to work; verify with the URI parsing and escaping tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100