summaryrefslogtreecommitdiff
path: root/indra/llui/lltexteditor.cpp
diff options
context:
space:
mode:
authorcoyot@coyot-sager-PC.hsd1.ca.comcast.net <coyot@coyot-sager-PC.hsd1.ca.comcast.net>2017-05-05 18:07:00 +0100
committercoyot@coyot-sager-PC.hsd1.ca.comcast.net <coyot@coyot-sager-PC.hsd1.ca.comcast.net>2017-05-05 18:07:00 +0100
commita1194ce6e9faaa259821611b51d4448fea49ddc1 (patch)
tree4d1c63b64ae44a2a1855d0e10f595495971a044d /indra/llui/lltexteditor.cpp
parentc15ffb40458184002ade41ff652fab3d9ffbb761 (diff)
parent322767f98e3c3164e3be03daa85580038ca6fb52 (diff)
pull from gate
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 )
{