-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
URL.href has an extraneous slash #31082
URL.href has an extraneous slash #31082
Conversation
Base commit: ede065c |
Base commit: ede065c |
TODO
|
I left a comment here: #30914 (comment) While this does fix a bug, it introduces another bug. If we are going to make a change to I believe the correct behavior will require parsing supplied URLs into each parts in order to do proper |
Thanks a lot Timothy Yung. I include this information to help myself troubleshoot this issue. const b = new URL('https://developer.mozilla.org');
expect(b.href).toBe('https://developer.mozilla.org/'); Instead we just add the react-native/Libraries/Blob/URL.js Lines 127 to 133 in f602cd9
I am looking into the whatwg-url Thanks a lot 🙏 |
whatwg-url uses Other functions will handle other required aspects of parsing and formatting urls.
I'm considering using Thanks a lot 🙏 |
If we're going to pull in My only concern would be the size of the library introduced into React Native. On the one hand… this module should only need to be initialized if it is used. On the other hand… it still introduces weight to app binaries. Taking a step back, though… since we already provide |
Summary
This issue fixes #30914
The logic of adding extraneous slash to url was introduced with pr #22901 but It should be removed for the following reasons:
Changelog
[Android] [Fixed] - Avoid adding extraneous slash to end of url
Test Plan
TODO: