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

fix: handle uppercase encoding #32

Merged
merged 3 commits into from
Aug 17, 2021
Merged

fix: handle uppercase encoding #32

merged 3 commits into from
Aug 17, 2021

Conversation

aurelienbottazini
Copy link
Contributor

Fixes: #31

Makes sure encoded slashes and ampersand are not decoded by normalize in the url as those are reserved chars.
I also verified in the spec that %3f (question mark) is not decoded.

@pi0 pi0 changed the title bug: handle uppercase encoding for / (%2f) fix: handle uppercase encoding for / (%2f) Aug 17, 2021
@pi0 pi0 changed the title fix: handle uppercase encoding for / (%2f) fix: handle uppercase encoding Aug 17, 2021
@codecov-commenter
Copy link

Codecov Report

Merging #32 (2ad3261) into main (9dbf95c) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main      #32   +/-   ##
=======================================
  Coverage   87.60%   87.60%           
=======================================
  Files           7        7           
  Lines         234      234           
  Branches       74       57   -17     
=======================================
  Hits          205      205           
  Misses         29       29           
Impacted Files Coverage Δ
src/encoding.ts 97.43% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9dbf95c...2ad3261. Read the comment docs.

@pi0 pi0 merged commit 7a663e2 into unjs:main Aug 17, 2021
@pi0
Copy link
Member

pi0 commented Aug 17, 2021

Thanks for PR @aurelienbottazini <3 I've added i flag to other encoding regexes as well.

@aurelienbottazini
Copy link
Contributor Author

You are welcome thanks for all your work ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Encoded slash in URL
3 participants