summaryrefslogtreecommitdiff
path: root/indra/llui/lltexteditor.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2017-05-18 15:33:58 -0400
committerOz Linden <oz@lindenlab.com>2017-05-18 15:33:58 -0400
commit013f34ccdd1df275a02e6ca56f8f19b51413b35a (patch)
treee9a88852afc69ef7b4642cb9820e1c31772c1c40 /indra/llui/lltexteditor.cpp
parentab3742a2a944ee8535e314ebfad52a980e079a70 (diff)
parent4bf1f1d618d61f0cc2ec0dd22cea7d1c5b909b8f (diff)
merge latest updates from coyot
Diffstat (limited to 'indra/llui/lltexteditor.cpp')
-rw-r--r--indra/llui/lltexteditor.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp
index 73f961b36b..1a49b94c23 100644
--- a/indra/llui/lltexteditor.cpp
+++ b/indra/llui/lltexteditor.cpp
@@ -1459,6 +1459,10 @@ void LLTextEditor::pasteHelper(bool is_primary)
// Clean up string (replace tabs and remove characters that our fonts don't support).
void LLTextEditor::cleanStringForPaste(LLWString & clean_string)
{
+ std::string clean_string_utf = wstring_to_utf8str(clean_string);
+ std::replace( clean_string_utf.begin(), clean_string_utf.end(), '\r', '\n');
+ clean_string = utf8str_to_wstring(clean_string_utf);
+
LLWStringUtil::replaceTabsWithSpaces(clean_string, SPACES_PER_TAB);
if( mAllowEmbeddedItems )
{