diff options
author | Mnikolenko Productengine <mnikolenko@productengine.com> | 2017-03-22 17:50:04 +0200 |
---|---|---|
committer | Mnikolenko Productengine <mnikolenko@productengine.com> | 2017-03-22 17:50:04 +0200 |
commit | 4261f6ee117e361d3c43147d5f02d7607c63b2ff (patch) | |
tree | 0c7478abdd3d77482de8d7a7727c5187332205bc /indra | |
parent | ae59476522c1d91074df53968b28da182c25381c (diff) |
MAINT-6404 FIXED When pasting from Mac Word into a notecard, line break is replaced by ?
Diffstat (limited to 'indra')
-rw-r--r-- | indra/llui/lltexteditor.cpp | 4 |
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 ) { |