Skip to content
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

Closed
n9iels opened this issue May 25, 2020 · 4 comments
Closed

Escape URI components for URLSearchParams #28966

n9iels opened this issue May 25, 2020 · 4 comments
Labels
Needs: Attention Issues where the author has responded to feedback. Stale There has been a lack of activity on this issue and it may be closed soon.

Comments

@n9iels
Copy link

n9iels commented May 25, 2020

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.

// The reference code bloat comes from Unicode issues with URLs, so those won't work here.

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 of URLSearchParams 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

@react-native-bot react-native-bot added Needs: Author Feedback Needs: Environment Info Please run `react-native info` and edit your issue with that command's output. and removed Needs: Triage 🔍 labels May 25, 2020
@github-actions
Copy link

⚠️ Missing Environment Information
ℹ️ Your issue may be missing information about your development environment. You can obtain the missing information by running react-native info in a console.

@react-native-bot react-native-bot removed the Needs: Environment Info Please run `react-native info` and edit your issue with that command's output. label May 25, 2020
@n9iels
Copy link
Author

n9iels commented Jun 3, 2020

Environment information is already given. What "Author feedback" does it need?

@github-actions github-actions bot added Needs: Attention Issues where the author has responded to feedback. and removed Needs: Author Feedback labels Jun 3, 2020
@stale
Copy link

stale bot commented Sep 2, 2020

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.

@stale stale bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Sep 2, 2020
scarlac added a commit to scarlac/react-native that referenced this issue Sep 2, 2020
@stale
Copy link

stale bot commented Sep 11, 2020

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.

@stale stale bot closed this as completed Sep 11, 2020
@facebook facebook locked as resolved and limited conversation to collaborators Oct 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Needs: Attention Issues where the author has responded to feedback. Stale There has been a lack of activity on this issue and it may be closed soon.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants