diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp
index 7aeeae298f754407abcf026372b21c6d6935ba8b..ef17fa4887f29d784984b2506134073f74fc6aeb 100644
--- a/indra/llui/lltextbase.cpp
+++ b/indra/llui/lltextbase.cpp
@@ -1699,9 +1699,6 @@ void LLTextBase::appendTextImpl(const std::string &new_text, const LLStyle::Para
 		while ( LLUrlRegistry::instance().findUrl(text, match,
 				boost::bind(&LLTextBase::replaceUrl, this, _1, _2, _3)) )
 		{
-			
-			LLTextUtil::processUrlMatch(&match,this);
-
 			start = match.getStart();
 			end = match.getEnd()+1;
 
@@ -1737,6 +1734,8 @@ void LLTextBase::appendTextImpl(const std::string &new_text, const LLStyle::Para
 					}
 			}
 
+			LLTextUtil::processUrlMatch(&match,this);
+
 			// move on to the rest of the text after the Url
 			if (end < (S32)text.length()) 
 			{