diff options
author | Merov Linden <merov@lindenlab.com> | 2013-05-30 14:07:59 -0700 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2013-05-30 14:07:59 -0700 |
commit | 0b4b92cbbfff5cd5ef6ed697a7605db7686c9952 (patch) | |
tree | 4211ad2db22cec252f2f45c1f47356b6fe73daf9 /indra/llcommon/lluri.cpp | |
parent | 168f4d8de0bf4f6a211366d5183a777b577b5cfe (diff) | |
parent | dcfb18373eca7986a73d8b9a1d34970cc0a23ed9 (diff) |
Pull merge from lindenlab/viewer-release
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 { |