-
Notifications
You must be signed in to change notification settings - Fork 556
fix parsing url strings with brackets #423
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
Conversation
* when path contains 'weird' characters (`[]`) URLComponents won't parse it, so the path will be nil * escaping the string with `urlQueryAllowed` character set fixes this issue
Generated by 🚫 Danger |
|
@nejcvivod Thanks for creating this PR! That's a good catch, can you please provide an entry in the |
* added `update` entries to CHANGELOG.md describing fixed parsing & new test * fix invalid test, don't need the full domain in parser * ran `swift test --generate-linuxmain`
|
@Vkt0r updated changelog & ran the command @swifter-bot posted :) |
|
@Vkt0r updated |
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.
This looks good to me @nejcvivod. Thanks again for your contribution!
fix parsing url strings with brackets
There seems to be an issue (on ios at least) where URLs with
[]query parameters are not parsed; URLComponents will producenilso routing won't succeed.This fix escapes the strings by percent-encoding them so query parameters should now work as expected.
Added unit test for such a case