summaryrefslogtreecommitdiff
path: root/indra/newview/llurllineeditorctrl.cpp
diff options
context:
space:
mode:
authorChristian Goetze (CG) <cg@lindenlab.com>2010-08-02 15:57:01 -0700
committerChristian Goetze (CG) <cg@lindenlab.com>2010-08-02 15:57:01 -0700
commit4f6e814eaa7ae5cfc10e4e7d1f22e53be395a2f4 (patch)
treebe554f9f22996e00dada6da67f7e77eb0502b0f5 /indra/newview/llurllineeditorctrl.cpp
parentf423a69864c40f760c1c7e64a2e544fd1dba77fb (diff)
parent15247f086989a43881d79c1ee5416bb00721eb68 (diff)
Fix the reversion imported from viewer-hotfix via: "hg pull -r 1c95812ba38b ../viewer-public" - reviewed by richard
Diffstat (limited to 'indra/newview/llurllineeditorctrl.cpp')
-rw-r--r--indra/newview/llurllineeditorctrl.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/indra/newview/llurllineeditorctrl.cpp b/indra/newview/llurllineeditorctrl.cpp
index 8488527185..333f682e8f 100644
--- a/indra/newview/llurllineeditorctrl.cpp
+++ b/indra/newview/llurllineeditorctrl.cpp
@@ -89,9 +89,10 @@ void LLURLLineEditor::copyEscapedURLToClipboard()
const std::string unescaped_text = wstring_to_utf8str(mText.getWString().substr(left_pos, length));
LLWString text_to_copy;
- if (LLSLURL(unescaped_text).isValid())
+ // *HACK: Because LLSLURL is currently broken we cannot use it to check if unescaped_text is a valid SLURL (see EXT-8335).
+ if (LLStringUtil::startsWith(unescaped_text, "http://")) // SLURL
text_to_copy = utf8str_to_wstring(LLWeb::escapeURL(unescaped_text));
- else
+ else // human-readable location
text_to_copy = utf8str_to_wstring(unescaped_text);
gClipboard.copyFromString( text_to_copy );