diff options
author | Oz Linden <oz@lindenlab.com> | 2013-05-22 06:27:51 -0400 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2013-05-22 06:27:51 -0400 |
commit | 7fad053982d835ff5b9ec496bc94ddbedc234dcc (patch) | |
tree | 273e8a4ed1fc258675af0dc68c5bed7a3d43b92e /indra/llcommon/lluri.cpp | |
parent | 4f08780b00bd6c4f40b88dc46ed9363dbcbf7836 (diff) | |
parent | 892f3cdd2c4d1b6aa9ec86547022d9f8194d6b80 (diff) |
merge changes for chui-967
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 { |