diff options
author | Alexander Gluzsky <sss123next@list.ru> | 2016-07-13 16:06:33 +0000 |
---|---|---|
committer | Alexander Gluzsky <sss123next@list.ru> | 2016-07-13 16:06:33 +0000 |
commit | a16c56487b6e923b2e552bcaa6285ce45154bb48 (patch) | |
tree | 4dc90ffe88cda9410f54c2b198a77c16010be8ac | |
parent | 9882fe4a7b639a475df8b2a340baf3dbb4156222 (diff) |
mir_core:
make mir_urlencode more RFC3986 compliant (hint from libpurple code)
git-svn-id: http://svn.miranda-ng.org/main/trunk@17092 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rwxr-xr-x[-rw-r--r--] | src/mir_core/src/http.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mir_core/src/http.cpp b/src/mir_core/src/http.cpp index 8105140c0b..fae3ece203 100644..100755 --- a/src/mir_core/src/http.cpp +++ b/src/mir_core/src/http.cpp @@ -32,7 +32,7 @@ MIR_CORE_DLL(char*) mir_urlEncode(const char *szUrl) if (('0' <= *s && *s <= '9') || //0-9
('A' <= *s && *s <= 'Z') || //ABC...XYZ
('a' <= *s && *s <= 'z') || //abc...xyz
- *s == '-' || *s == '_' || *s == '.' || *s == ' ') outputLen++;
+ *s == '-' || *s == '_' || *s == '.' || *s == ' ' || *s == '~') outputLen++;
else outputLen += 3;
}
@@ -45,7 +45,7 @@ MIR_CORE_DLL(char*) mir_urlEncode(const char *szUrl) if (('0' <= *s && *s <= '9') || //0-9
('A' <= *s && *s <= 'Z') || //ABC...XYZ
('a' <= *s && *s <= 'z') || //abc...xyz
- *s == '-' || *s == '_' || *s == '.') *d++ = *s;
+ *s == '-' || *s == '_' || *s == '.' || *s == '~') *d++ = *s;
else if (*s == ' ') *d++='+';
else {
*d++ = '%';
|