diff options
author | andreykproductengine <akleshchev@productengine.com> | 2017-04-07 20:29:24 +0300 |
---|---|---|
committer | andreykproductengine <akleshchev@productengine.com> | 2017-04-07 20:29:24 +0300 |
commit | 10213f994f64de1f50e1ff6b9b5f43be549d19cb (patch) | |
tree | 4601ae0cc10b58301834a0a357ccf060cf1ab845 /indra/llcommon | |
parent | b7c909367e2cf022588413accae9d2dc6bd8cf34 (diff) |
MAINT-6283 Names that contain 'http:' or 'https:' were causing new line in chat history
Diffstat (limited to 'indra/llcommon')
-rw-r--r-- | indra/llcommon/lluri.cpp | 7 | ||||
-rw-r--r-- | indra/llcommon/lluri.h | 8 |
2 files changed, 12 insertions, 3 deletions
diff --git a/indra/llcommon/lluri.cpp b/indra/llcommon/lluri.cpp index 9f12d49244..758b98e143 100644 --- a/indra/llcommon/lluri.cpp +++ b/indra/llcommon/lluri.cpp @@ -40,7 +40,8 @@ #include <boost/algorithm/string/find_iterator.hpp> #include <boost/algorithm/string/finder.hpp> -void encode_character(std::ostream& ostr, std::string::value_type val) +// static +void LLURI::encodeCharacter(std::ostream& ostr, std::string::value_type val) { ostr << "%" @@ -95,7 +96,7 @@ std::string LLURI::escape( } else { - encode_character(ostr, c); + encodeCharacter(ostr, c); } } } @@ -106,7 +107,7 @@ std::string LLURI::escape( c = *it; if(allowed.find(c) == std::string::npos) { - encode_character(ostr, c); + encodeCharacter(ostr, c); } else { diff --git a/indra/llcommon/lluri.h b/indra/llcommon/lluri.h index c82a666e48..9e44cc7da2 100644 --- a/indra/llcommon/lluri.h +++ b/indra/llcommon/lluri.h @@ -121,6 +121,14 @@ public: /** @name Escaping Utilities */ //@{ /** + * @brief 'Escape' symbol into stream + * + * @param ostr Output stream. + * @param val Symbol to encode. + */ + static void encodeCharacter(std::ostream& ostr, std::string::value_type val); + + /** * @brief Escape the string passed except for unreserved * * ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz |