diff options
author | Cinder Roxley <cinder.roxley@phoenixviewer.com> | 2013-06-27 21:31:48 -0600 |
---|---|---|
committer | Cinder Roxley <cinder.roxley@phoenixviewer.com> | 2013-06-27 21:31:48 -0600 |
commit | 97ed20a12bc5b0c0a14534970146425bc854d7fb (patch) | |
tree | 7071c3750cf0b32c12c0fe32cfaecddcfa6da4f0 /indra/llcommon/lluri.cpp | |
parent | 4cf16ffdfbb166fbb3fcf1d7950ca1a240c94ca1 (diff) | |
parent | 6060e5e46acbeb20a301070a0fd0efea029d33d0 (diff) |
Merged lindenlab/viewer-release into default
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 { |