Commits

Anonymous committed e74c3d9

EXT-1251: strip leading/trailing whitespace from user input in the
navigation bar when trying to access if the input is a valid SLURL.

Comments (0)

Files changed (2)

indra/newview/lllocationinputctrl.cpp

 {
 	//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));

indra/newview/llnavigationbar.cpp

 void LLNavigationBar::onLocationSelection()
 {
 	std::string typed_location = mCmbLocation->getSimple();
+	LLStringUtil::trim(typed_location);
 
 	// Will not teleport to empty location.
 	if (typed_location.empty())