-
Notifications
You must be signed in to change notification settings - Fork 23
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
Should we treat +
as %20
in query part?
#38
Comments
I know that this is not a real argument for discussion, but other libs/tools/frameworks do seem to decode
Also I've tested on two versions of Firefox and Chromium (latest Firefox nightly 59.0a1 (2017-11-20), Chromium 62.0.3202.89 and Firefox 56.0.2) that this form:
results in |
Sorry, I wasn't aware of this closed thread: #25 Should I close this issue? |
The new version of the library doesn't fix this specifically, but it's now possible to solve it in a way that is more natural than having to do custom parsing/printing on the whole URI. 🎉 |
I know that it is not compliant with RFC 3986 as it allows only percent encoding of special characters (and explicitly shows how to encode spaces), but unfortunately
+
is used as space encoding character in query part by many libraries and even browsers (based on RFC-1866 - first sentence in first section!) - situation is quite clearly described in this answer:https://stackoverflow.com/questions/2678551/when-to-encode-space-to-plus-or-20#answer-47188851
After query decoding phase users of this library are not able to differentiate if
+
means really decoded%2B
or literal+
(which was incorrectly used), so maybe we should decode these incorrectly used pluses as%20
before passing query string todecodeURIComponent
.If you agree I can provide appropriate pull request with this change ;-)
The text was updated successfully, but these errors were encountered: