From d5626fe595683075e300a5855fa27c6dab49e3fe Mon Sep 17 00:00:00 2001 From: root Date: Tue, 17 Dec 2013 15:12:03 +0100 Subject: [PATCH] Changed url encoding of space character to use %20 instead of the plus (+) sign. --- src/string_util.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/string_util.cpp b/src/string_util.cpp index 5dc41c4..331be3d 100644 --- a/src/string_util.cpp +++ b/src/string_util.cpp @@ -130,7 +130,9 @@ string urlEncode(const string &s) } else if (s[i] == '.' || s[i] == '-' || s[i] == '*' || s[i] == '_') { result += s[i]; } else if (s[i] == ' ') { - result += '+'; + result += '%'; + result += '2'; + result += '0'; } else { result += "%"; result += hexAlphabet[static_cast(s[i]) / 16];