diff options
| author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2013-06-18 17:19:53 -0400 |
|---|---|---|
| committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2013-06-18 17:19:53 -0400 |
| commit | c62b6c46955a16af9ec16ff7e6bf9fb2c4b6e229 (patch) | |
| tree | ed3214d428e960b9e840eccdba31255c0fdcaea6 /indra/llcommon/lluri.cpp | |
| parent | f88594599c01edff981b6d070f84566fcb7d4ecf (diff) | |
| parent | 69b062b90889fe581de0d10d60b979cb7883b4a0 (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 { |
