Treat invalid percent encoding consistently
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 54.3k
- Forks
- 10.4k
- Avg merge
- 16h 43m
- Merged PRs (30d)
- 3
Description
The present form of requote_uri unnecessarily divides invalid cases.
When alpha-numeric, '%' is quoted to '%25'.
E.g. %pp to %25pp.
When not alpha-numeric, '%' is kept as is.
E.g. %-- to %--.
(Note these two examples are in the tests,
and the latter is for unquote_unreserved,
but the result is the same.)
Or %<< to %%3C%3C.
but I think '%' should be quoted in all invalid cases.
(Or to put it differently, isolated '%' must be quoted.)
Contributor guide
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 by reading requote_uri and the existing tests for invalid percent encodings, including the examples in the issue. Trace how alpha-numeric and non-alphanumeric invalid cases are handled, then verify that isolated percent signs are treated consistently and the relevant tests pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100