-
-
Notifications
You must be signed in to change notification settings - Fork 21.2k
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
Unify URI encoding/decoding, handle spaces-are-pluses, and handle hex/bin prefix automatically #43978
Conversation
7c69ecf
to
070d7dd
Compare
70158d5
to
529c0e5
Compare
f0e0afa
to
fe6a16c
Compare
From the code and docs, it seems like this does break compat as the argument was exposed. But I'm still OK with the change for 4.0. |
fe6a16c
to
765b213
Compare
The original statement was correct, it's not exposed in 3.2 indeed. It was exposed in 4.0 with the Variant refactor, but it's fine to unexpose it. |
Also add BinToInt to C#
http_escape and percent_encode have been unified into uri_encode, and http_unescape and percent_decode have been unified into uri_decode.
765b213
to
e829b7a
Compare
Thanks! |
Made in response to #43929. The first two bullet points are one commit, the last three are the second commit.
Make
String::hex_to_int()
andString::bin_to_int()
automatically handle the prefix. This simplifies the code, both internally and for the end user. Thep_with_prefix
argument was not exposed in 3.2, so this doesn't break compat.Add
BinToInt
instance method tostring
in C#.Unify
http_escape
andpercent_encode
intouri_encode
, andhttp_unescape
andpercent_decode
intouri_decode
.This restores part of Enhance uri utils #17583 and un-reverts that part's reversion Revert "Unify http- and percent- encode/decode" #18156 (see either of these for discussion).
Tweak
String::uri_decode()
so that it handles spaces encoded as+
.Add
URIEncode
andURIDecode
instance methods tostring
in C#.Me making this PR: