-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
Resolve protocol http, https when not in lowercase #21396
Conversation
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.
eslint
found some issues. You may run yarn prettier
or npm run prettier
to fix these.
Can someone help me understand why one of the tests have failed? |
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.
Nice catch!
This is almost ready to merge. I just have a few nits, and one question.
@hyunjongL I don't think your PR broke CI. So, I wouldn't worry about it. |
@RSNara check out the changes! |
Thanks for the quick fixes! I'll merge this. |
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.
RSNara is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
@hyunjongL merged commit d00bdb9 into |
Summary: Thank you for sending the PR! We appreciate you spending the time to work on these changes. Help us understand your motivation by explaining why you decided to make this change. If this PR fixes an issue, type "Fixes #issueNumber" to automatically close the issue when the PR is merged. _Pull requests that expand test coverage are more likely to get reviewed. Add a test case whenever possible!_ Pull Request resolved: #21396 Differential Revision: D10119630 Pulled By: RSNara fbshipit-source-id: d0fe193eee976b9b18a2eb467b5f3af48bd7d2de
Summary: Thank you for sending the PR! We appreciate you spending the time to work on these changes. Help us understand your motivation by explaining why you decided to make this change. If this PR fixes an issue, type "Fixes #issueNumber" to automatically close the issue when the PR is merged. _Pull requests that expand test coverage are more likely to get reviewed. Add a test case whenever possible!_ Pull Request resolved: facebook#21396 Differential Revision: D10119630 Pulled By: RSNara fbshipit-source-id: d0fe193eee976b9b18a2eb467b5f3af48bd7d2de
Thank you for sending the PR! We appreciate you spending the time to work on these changes.
Help us understand your motivation by explaining why you decided to make this change.
If this PR fixes an issue, type "Fixes #issueNumber" to automatically close the issue when the PR is merged.
Pull requests that expand test coverage are more likely to get reviewed. Add a test case whenever possible!
Test Plan:
Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work. Bonus points for screenshots and videos!
I have added to my react native app that has to open URLs with protocols(Https) that have uppercases. Added console log of the url back and forth to test if the url has changed.
You can easily build an react-native app like https://snack.expo.io/@hyunjongl/android-linking-protocol-problem and see if this resolves it.
This is the screenshot of the console log where I try to open a URL with Https, and the code will automatically change it into https.
Release Notes:
Fixes #21395
[ANDROID][ENHANCEMENT][Libraries/Linking/Linking.js]
https://snack.expo.io/@hyunjongl/android-linking-protocol-problem
There issue is that when you have a URL with protocol that has an uppercase, it works in iOS, but won't work in Android. (check the Expo above).
There are a lot of user generated URLs in social platforms, and I bet it is not a good Idea to change what the user have wrote. Also currently I feel like iOS and Android behave differently in this issue which makes me feel bad.
So, I am suggesting a way to change the protocol['http://', 'https://'] into lowercase just before opening the browser. However, as I am very new to this community, it might not be the best place to add the lines, so comments are very welcome.
TL;DR Added few lines to change the protocol string to lowercase when some are in uppercase.