summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/lllocationinputctrl.cpp5
-rw-r--r--indra/newview/llnavigationbar.cpp1
2 files changed, 4 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));
diff --git a/indra/newview/llnavigationbar.cpp b/indra/newview/llnavigationbar.cpp
index b1db51dd26..19fee20740 100644
--- a/indra/newview/llnavigationbar.cpp
+++ b/indra/newview/llnavigationbar.cpp
@@ -317,6 +317,7 @@ void LLNavigationBar::onTeleportHistoryMenuItemClicked(const LLSD& userdata)
void LLNavigationBar::onLocationSelection()
{
std::string typed_location = mCmbLocation->getSimple();
+ LLStringUtil::trim(typed_location);
// Will not teleport to empty location.
if (typed_location.empty())