Merge pull request #1 from dejaeghd/master

Using %20 instead of the plus (+) sign for encoding spaces
This commit is contained in:
rrizun 2013-12-17 07:57:15 -08:00
commit d9f13dbdcb

View File

@ -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<unsigned char>(s[i]) / 16];