diff options
author | Oz Linden <oz@lindenlab.com> | 2013-06-13 15:28:13 -0400 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2013-06-13 15:28:13 -0400 |
commit | 2268bf38339178f93b317693c0a6808807301d64 (patch) | |
tree | 0a17c21975babce8422b9b62a1683947f5a58f2c /indra/llcommon/lluri.cpp | |
parent | d233d8836b610b5e5ca76a1e3bb4d63dc3592e66 (diff) | |
parent | dcfb18373eca7986a73d8b9a1d34970cc0a23ed9 (diff) |
merge changes for 3.5.3-release
Diffstat (limited to 'indra/llcommon/lluri.cpp')
-rwxr-xr-x[-rw-r--r--] | 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 100644..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 { |