diff options
author | Gilbert Gonzales <gilbert@lindenlab.com> | 2013-05-30 17:05:56 -0700 |
---|---|---|
committer | Gilbert Gonzales <gilbert@lindenlab.com> | 2013-05-30 17:05:56 -0700 |
commit | 2bb7b3f6bcb2318d96f1be45093e5bae7b7f8167 (patch) | |
tree | 2f4053f539cfa9d2978686278c88862fc52586a7 /indra/llcommon/lluri.cpp | |
parent | 296377a64f1fee320e4f86a858116e2831c6e4aa (diff) | |
parent | 1f84fe88c66558411382e515f6abe8b677f9b98d (diff) |
merge
Diffstat (limited to 'indra/llcommon/lluri.cpp')
-rwxr-xr-x | indra/llcommon/lluri.cpp | 29 |
1 files changed, 24 insertions, 5 deletions
diff --git a/indra/llcommon/lluri.cpp b/indra/llcommon/lluri.cpp index 21456a599b..37f5b3d6a3 100755 --- a/indra/llcommon/lluri.cpp +++ b/indra/llcommon/lluri.cpp @@ -129,11 +129,30 @@ std::string LLURI::unescape(const std::string& str) { ++it; if(it == end) break; - U8 c = hex_as_nybble(*it++); - c = c << 4; - if (it == end) break; - c |= hex_as_nybble(*it); - ostr.put((char)c); + + if(is_char_hex(*it)) + { + U8 c = hex_as_nybble(*it++); + + c = c << 4; + if (it == end) break; + + if(is_char_hex(*it)) + { + c |= hex_as_nybble(*it); + ostr.put((char)c); + } + else + { + ostr.put((char)c); + ostr.put(*it); + } + } + else + { + ostr.put('%'); + ostr.put(*it); + } } else { |