diff options
author | Martin Reddy <lynx@lindenlab.com> | 2009-10-01 09:52:05 +0000 |
---|---|---|
committer | Martin Reddy <lynx@lindenlab.com> | 2009-10-01 09:52:05 +0000 |
commit | a0a5c8e615869d449bfad94ec9a650aad82cab91 (patch) | |
tree | 74049b6ad5eadb2ed228bb72a585b34486d26dcc /indra/newview/lllocationinputctrl.cpp | |
parent | cf9239cabcf7999a2d2393bd4bdb6fc08e27c09c (diff) |
EXT-1251: strip leading/trailing whitespace from user input in the
navigation bar when trying to access if the input is a valid SLURL.
Diffstat (limited to 'indra/newview/lllocationinputctrl.cpp')
-rw-r--r-- | indra/newview/lllocationinputctrl.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/indra/newview/lllocationinputctrl.cpp b/indra/newview/lllocationinputctrl.cpp index a6c2435e1e..68dc3854db 100644 --- a/indra/newview/lllocationinputctrl.cpp +++ b/indra/newview/lllocationinputctrl.cpp @@ -656,8 +656,9 @@ void LLLocationInputCtrl::changeLocationPresentation() { //change location presentation only if user does not select anything and //human-readable region name is being displayed - if(mTextEntry && !mTextEntry->hasSelection() && - !LLSLURL::isSLURL(mTextEntry->getText())) + std::string text = mTextEntry->getText(); + LLStringUtil::trim(text); + if(mTextEntry && !mTextEntry->hasSelection() && !LLSLURL::isSLURL(text)) { //needs unescaped one mTextEntry->setText(LLAgentUI::buildSLURL(false)); |