-
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
Escape URI components for URLSearchParams #28966
Comments
|
Environment information is already given. What "Author feedback" does it need? |
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions. |
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information. |
Description
Currently when using
URLSearchParams
the given values are not encoded (escaped). A comment in the current implementation says that this will not work due to Unicode issues.react-native/Libraries/Blob/URL.js
Line 55 in cd347a7
I don't know the ins and outs of that particular issue, but I do think that at least escaping URI components (
?,=,/,&,:
) is a good idea. I understand that only escaping those characters and not UTF-8 characters can be seen as a "half" solution. However the current implementation ofURLSearchParams
is not very useful at all. At lease escaping those URI components makes it a lot more useful, and overall a lot safer to use, in situation where no UTF-8 chars are involved.React Native version:
System:
OS: Linux 5.3 Ubuntu 18.04.4 LTS (Bionic Beaver)
CPU: (4) x64 Intel(R) Core(TM) i5-4670K CPU @ 3.40GHz
Memory: 11.28 GB / 15.58 GB
Shell: 5.4.2 - /usr/bin/zsh
Binaries:
Node: 12.16.3 - /usr/bin/node
npm: 6.14.5 - ~/.npm-global/bin/npm
npmPackages:
react: 16.9.0 => 16.9.0
react-native: https://github.com/expo/react-native/archive/sdk-36.0.1.tar.gz => 0.61.4
The text was updated successfully, but these errors were encountered: