Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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: normalize routes and decode resolved query #8430
fix: normalize routes and decode resolved query #8430
Changes from 19 commits
93e58ba
132d4d4
0a451e2
849ac37
ec625db
1c63f05
0867719
b5cb57c
7c2b809
ca44ade
00f9a41
a5851d6
3b47964
87ddc40
f85e60e
a5792a1
2e1b640
1139beb
bb54387
f5ae2a5
fbaaee6
2a805bd
6fdec2d
c757f74
06d15df
8307295
dee47d9
1da49d5
0c107c3
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if url includes %.. as path or parameter ?
Like: /rate/%30?max=%90
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/%[0-9a-fA-F]{2}/.test('/rate/%30?max=%90')
> trueIn this case we avoid encoding
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So if url also includes special characters, we’ll skip encoding, is that expected?
Like: /rate/%30?max=%90&name= тест
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Last update:
/rate/%30?max=%90&name=%20%D1%82%D0%B5%D1%81%D1%82
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any merit in using something like this as our util - not reinventing url parsing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed we can but it costs bundle size for rest of the browsers and actually it is not enough to make url utils (for joining or ensure there is no leading slash for example) -- not specific to this PR's case
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In fact IE11 works fine for me - just have to wrap in brackets.
![Screenshot from 2020-12-04 16-23-20](https://user-images.githubusercontent.com/28706372/101188062-1ce3b980-364d-11eb-9788-a1bb465e2ad0.png)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair enough :) Switching to URL
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is just one downside that it is implicit it is full url or URI :))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for bringing it up. Working on util before merge ;)