summaryrefslogtreecommitdiff
path: root/indra/newview/llurllineeditorctrl.cpp
diff options
context:
space:
mode:
authorMark Palange (Mani) <palange@lindenlab.com>2009-10-16 16:42:45 -0700
committerMark Palange (Mani) <palange@lindenlab.com>2009-10-16 16:42:45 -0700
commit3e10fa4d51a23bf6f1ced23e8d90c636d84fa5db (patch)
treed4991e4c1a9dd934f48d33804e55eb8ffa085679 /indra/newview/llurllineeditorctrl.cpp
parente9f7205ba9f4dfb3422759218609b62d61972722 (diff)
parentf20e9521a9b70f4e83cbb6888feae08a70681ea7 (diff)
merge from latest svn/viewer-2-0 to hg/viewer-2-0
Diffstat (limited to 'indra/newview/llurllineeditorctrl.cpp')
-rw-r--r--indra/newview/llurllineeditorctrl.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/indra/newview/llurllineeditorctrl.cpp b/indra/newview/llurllineeditorctrl.cpp
index 046b3e619b..258c3ddd75 100644
--- a/indra/newview/llurllineeditorctrl.cpp
+++ b/indra/newview/llurllineeditorctrl.cpp
@@ -38,6 +38,7 @@
#include "llurllineeditorctrl.h"
#include "llweb.h"
+#include "llslurl.h"
//Constructor
LLURLLineEditor::LLURLLineEditor(const LLLineEditor::Params& p)
@@ -87,8 +88,13 @@ void LLURLLineEditor::copyEscapedURLToClipboard()
S32 length = llabs( mSelectionStart - mSelectionEnd );
const std::string unescaped_text = wstring_to_utf8str(mText.getWString().substr(left_pos, length));
- LLWString selected_escaped_text = utf8str_to_wstring(LLWeb::escapeURL(unescaped_text));
- gClipboard.copyFromString( selected_escaped_text );
+ LLWString text_to_copy;
+ if (LLSLURL::isSLURL(unescaped_text))
+ text_to_copy = utf8str_to_wstring(LLWeb::escapeURL(unescaped_text));
+ else
+ text_to_copy = utf8str_to_wstring(unescaped_text);
+
+ gClipboard.copyFromString( text_to_copy );
}
// Makes UISndBadKeystroke sound
void LLURLLineEditor::reportBadKeystroke()