diff options
| author | Jonathan Yap <jhwelch@gmail.com> | 2018-01-12 09:08:49 -0500 |
|---|---|---|
| committer | Jonathan Yap <jhwelch@gmail.com> | 2018-01-12 09:08:49 -0500 |
| commit | 1e586749efeeb8c40503330572680a8709ae5487 (patch) | |
| tree | 5c1ebee5dbdb5004f354b9fb0837d60f6dd3cfcc /indra/llui/lltexteditor.cpp | |
| parent | 32f16633c77564d567ed0752e56eb38abb916ccd (diff) | |
| parent | 1693ccba58eef676df1f91e50627545ac35bb819 (diff) | |
STORM-2145 Merge up to viewer-release
Diffstat (limited to 'indra/llui/lltexteditor.cpp')
| -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 ) { |
