diff --git a/indra/llui/llstyle.cpp b/indra/llui/llstyle.cpp
index b8f93b6a0eaefb5cac94122f3352517bfec7569c..5965ca6fb531ee76dc2ada938b8d9b991304b5ce 100644
--- a/indra/llui/llstyle.cpp
+++ b/indra/llui/llstyle.cpp
@@ -44,7 +44,8 @@ LLStyle::Params::Params()
 	color("color", LLColor4::black),
 	font("font", LLFontGL::getFontMonospace()),
 	image("image"),
-	link_href("href")
+	link_href("href"),
+	is_link("is_link")
 {}
 
 
@@ -57,6 +58,7 @@ LLStyle::LLStyle(const LLStyle::Params& p)
 	mReadOnlyColor(p.readonly_color()),
 	mFont(p.font()),
 	mLink(p.link_href),
+	mIsLink(p.is_link.isProvided() ? p.is_link : !p.link_href().empty()),
 	mDropShadow(p.drop_shadow),
 	mImagep(p.image())
 {}
@@ -79,7 +81,7 @@ void LLStyle::setLinkHREF(const std::string& href)
 
 BOOL LLStyle::isLink() const
 {
-	return mLink.size();
+	return mIsLink;
 }
 
 BOOL LLStyle::isVisible() const
diff --git a/indra/llui/llstyle.h b/indra/llui/llstyle.h
index 2067e8e8be3674ffb562342af69b92654f3648c8..0ca1f2027edd1e6a6a15afe3ab8f3725ddca5e22 100644
--- a/indra/llui/llstyle.h
+++ b/indra/llui/llstyle.h
@@ -51,6 +51,7 @@ class LLStyle : public LLRefCount
 		Optional<const LLFontGL*>		font;
 		Optional<LLUIImage*>			image;
 		Optional<std::string>			link_href;
+		Optional<bool>					is_link;
 		Params();
 	};
 	LLStyle(const Params& p = Params());
@@ -113,6 +114,7 @@ class LLStyle : public LLRefCount
 	std::string	mFontName;
 	const LLFontGL*   mFont;		// cached for performance
 	std::string	mLink;
+	bool		mIsLink;
 	LLUIImagePtr mImagep;
 };
 
diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp
index 915b0427ba6c5cf23ae6575dde0a3f611bf05f82..8fc6f16702e14421e9732afd5a870a055bdac658 100644
--- a/indra/llui/lltextbase.cpp
+++ b/indra/llui/lltextbase.cpp
@@ -1794,7 +1794,7 @@ void LLTextBase::replaceUrl(const std::string &url,
 		seg->setEnd(seg_start + seg_length);
 
 		// if we find a link with our Url, then replace the label
-		if (style->isLink() && style->getLinkHREF() == url)
+		if (style->getLinkHREF() == url)
 		{
 			S32 start = seg->getStart();
 			S32 end = seg->getEnd();
diff --git a/indra/llui/lltextbase.h b/indra/llui/lltextbase.h
index 3a3a5d0e20c70f4f7af1b462f97830305de50c8d..ddf604c195fece03699a9244e77fcbcf02047279 100644
--- a/indra/llui/lltextbase.h
+++ b/indra/llui/lltextbase.h
@@ -315,6 +315,7 @@ class LLTextBase
 	void							updateRects();
 	void							needsScroll() { mScrollNeeded = TRUE; }
 
+	struct URLLabelCallback;
 	// Replace a URL with a new icon and label, for example, when
 	// avatar names are looked up.
 	void replaceUrl(const std::string &url, const std::string &label, const std::string& icon);
diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp
index 60566f457d9b2f8549557b2992b4fb5b015a2f40..13fd20faf8c8f834868c3c968fa3343f62c52e1e 100644
--- a/indra/llui/llurlentry.cpp
+++ b/indra/llui/llurlentry.cpp
@@ -49,7 +49,6 @@ std::string localize_slapp_label(const std::string& url, const std::string& full
 
 
 LLUrlEntryBase::LLUrlEntryBase()
-: mDisabledLink(false)
 {}
 
 LLUrlEntryBase::~LLUrlEntryBase()
@@ -493,9 +492,7 @@ std::string LLUrlEntryAgent::getIcon(const std::string &url)
 // x-grid-location-info://lincoln.lindenlab.com/app/agent/0e346d8b-4433-4d66-a6b0-fd37083abc4c/(completename|displayname|username)
 //
 LLUrlEntryAgentName::LLUrlEntryAgentName()
-{
-	mDisabledLink = true;
-}
+{}
 
 void LLUrlEntryAgentName::onAvatarNameCache(const LLUUID& id,
 										const LLAvatarName& av_name)
@@ -544,7 +541,7 @@ std::string LLUrlEntryAgentName::getLabel(const std::string &url, const LLUrlLab
 LLStyle::Params LLUrlEntryAgentName::getStyle() const
 {
 	// don't override default colors
-	return LLStyle::Params();
+	return LLStyle::Params().is_link(false);
 }
 
 //
@@ -949,7 +946,6 @@ LLUrlEntryNoLink::LLUrlEntryNoLink()
 {
 	mPattern = boost::regex("<nolink>[^<]*</nolink>",
 							boost::regex::perl|boost::regex::icase);
-	mDisabledLink = true;
 }
 
 std::string LLUrlEntryNoLink::getUrl(const std::string &url) const
@@ -976,7 +972,6 @@ LLUrlEntryIcon::LLUrlEntryIcon()
 {
 	mPattern = boost::regex("<icon\\s*>\\s*([^<]*)?\\s*</icon\\s*>",
 							boost::regex::perl|boost::regex::icase);
-	mDisabledLink = true;
 }
 
 std::string LLUrlEntryIcon::getUrl(const std::string &url) const
diff --git a/indra/llui/llurlentry.h b/indra/llui/llurlentry.h
index ca4562cee005d9308930ce59ca46f84a64e42196..5be3c6a45bfd02ee8dbf7749bb25b378051d9b08 100644
--- a/indra/llui/llurlentry.h
+++ b/indra/llui/llurlentry.h
@@ -95,9 +95,6 @@ class LLUrlEntryBase
 	/// Return the name of a SL location described by this Url, if any
 	virtual std::string getLocation(const std::string &url) const { return ""; }
 
-	/// is this a match for a URL that should not be hyperlinked?
-	bool isLinkDisabled() const { return mDisabledLink; }
-
 protected:
 	std::string getIDStringFromUrl(const std::string &url) const;
 	std::string escapeUrl(const std::string &url) const;
@@ -117,7 +114,6 @@ class LLUrlEntryBase
 	std::string                                    	mMenuName;
 	std::string                                    	mTooltip;
 	std::multimap<std::string, LLUrlEntryObserver>	mObservers;
-	bool											mDisabledLink;
 };
 
 ///
diff --git a/indra/llui/llurlmatch.cpp b/indra/llui/llurlmatch.cpp
index dcfdd70b426fac043978157cad9189c9c195cbee..51fca6d7c058619ee07de8821357da6631dc3dc4 100644
--- a/indra/llui/llurlmatch.cpp
+++ b/indra/llui/llurlmatch.cpp
@@ -42,16 +42,14 @@ LLUrlMatch::LLUrlMatch() :
 	mTooltip(""),
 	mIcon(""),
 	mMenuName(""),
-	mLocation(""),
-	mDisabledLink(false)
+	mLocation("")
 {
 }
 
 void LLUrlMatch::setValues(U32 start, U32 end, const std::string &url,
 						   const std::string &label, const std::string &tooltip,
 						   const std::string &icon, const LLStyle::Params& style,
-						   const std::string &menu, const std::string &location,
-						   bool disabled_link)
+						   const std::string &menu, const std::string &location)
 {
 	mStart = start;
 	mEnd = end;
@@ -63,5 +61,4 @@ void LLUrlMatch::setValues(U32 start, U32 end, const std::string &url,
 	mStyle.link_href = url;
 	mMenuName = menu;
 	mLocation = location;
-	mDisabledLink = disabled_link;
 }
diff --git a/indra/llui/llurlmatch.h b/indra/llui/llurlmatch.h
index 293935e2511b1c574f7b753d58ab3bee37e476dc..3b15a156a8e460ce4a8efa0698e2c059c466d93a 100644
--- a/indra/llui/llurlmatch.h
+++ b/indra/llui/llurlmatch.h
@@ -83,14 +83,11 @@ class LLUrlMatch
 	/// return the SL location that this Url describes, or "" if none.
 	std::string getLocation() const { return mLocation; }
 
-	/// is this a match for a URL that should not be hyperlinked?
-	bool isLinkDisabled() const { return mDisabledLink; }
-
 	/// Change the contents of this match object (used by LLUrlRegistry)
 	void setValues(U32 start, U32 end, const std::string &url, const std::string &label,
 	               const std::string &tooltip, const std::string &icon,
 				   const LLStyle::Params& style, const std::string &menu, 
-				   const std::string &location, bool disabled_link);
+				   const std::string &location);
 
 private:
 	U32         mStart;
@@ -102,7 +99,6 @@ class LLUrlMatch
 	std::string mMenuName;
 	std::string mLocation;
 	LLStyle::Params mStyle;
-	bool        mDisabledLink;
 };
 
 #endif
diff --git a/indra/llui/llurlregistry.cpp b/indra/llui/llurlregistry.cpp
index f61603545fb8944bc2d1e88fb69bbade59415e82..f119233f8f1983e1810a75faacf85af178d33837 100644
--- a/indra/llui/llurlregistry.cpp
+++ b/indra/llui/llurlregistry.cpp
@@ -192,8 +192,7 @@ bool LLUrlRegistry::findUrl(const std::string &text, LLUrlMatch &match, const LL
 						match_entry->getIcon(url),
 						match_entry->getStyle(),
 						match_entry->getMenuName(),
-						match_entry->getLocation(url),
-						match_entry->isLinkDisabled());
+						match_entry->getLocation(url));
 		return true;
 	}
 
@@ -226,8 +225,7 @@ bool LLUrlRegistry::findUrl(const LLWString &text, LLUrlMatch &match, const LLUr
 						match.getIcon(),
 						match.getStyle(),
 						match.getMenuName(),
-						match.getLocation(),
-						match.isLinkDisabled());
+						match.getLocation());
 		return true;
 	}
 	return false;
diff --git a/indra/llui/tests/llurlmatch_test.cpp b/indra/llui/tests/llurlmatch_test.cpp
index 10c44a90736fcfa0937273aa9e66ca72c862d11f..d6ef5132c80c5d0f477cfa667f685d250365591a 100644
--- a/indra/llui/tests/llurlmatch_test.cpp
+++ b/indra/llui/tests/llurlmatch_test.cpp
@@ -176,7 +176,7 @@ namespace tut
 		LLUrlMatch match;
 		ensure("empty()", match.empty());
 
-		match.setValues(0, 1, "http://secondlife.com", "Second Life", "", "", LLStyle::Params(), "", "", false);
+		match.setValues(0, 1, "http://secondlife.com", "Second Life", "", "", LLStyle::Params(), "", "");
 		ensure("! empty()", ! match.empty());
 	}
 
@@ -189,7 +189,7 @@ namespace tut
 		LLUrlMatch match;
 		ensure_equals("getStart() == 0", match.getStart(), 0);
 
-		match.setValues(10, 20, "", "", "", "", LLStyle::Params(), "", "", false);
+		match.setValues(10, 20, "", "", "", "", LLStyle::Params(), "", "");
 		ensure_equals("getStart() == 10", match.getStart(), 10);
 	}
 
@@ -202,7 +202,7 @@ namespace tut
 		LLUrlMatch match;
 		ensure_equals("getEnd() == 0", match.getEnd(), 0);
 
-		match.setValues(10, 20, "", "", "", "", LLStyle::Params(), "", "", false);
+		match.setValues(10, 20, "", "", "", "", LLStyle::Params(), "", "");
 		ensure_equals("getEnd() == 20", match.getEnd(), 20);
 	}
 
@@ -215,10 +215,10 @@ namespace tut
 		LLUrlMatch match;
 		ensure_equals("getUrl() == ''", match.getUrl(), "");
 
-		match.setValues(10, 20, "http://slurl.com/", "", "", "", LLStyle::Params(), "", "", false);
+		match.setValues(10, 20, "http://slurl.com/", "", "", "", LLStyle::Params(), "", "");
 		ensure_equals("getUrl() == 'http://slurl.com/'", match.getUrl(), "http://slurl.com/");
 
-		match.setValues(10, 20, "", "", "", "", LLStyle::Params(), "", "", false);
+		match.setValues(10, 20, "", "", "", "", LLStyle::Params(), "", "");
 		ensure_equals("getUrl() == '' (2)", match.getUrl(), "");
 	}
 
@@ -231,10 +231,10 @@ namespace tut
 		LLUrlMatch match;
 		ensure_equals("getLabel() == ''", match.getLabel(), "");
 
-		match.setValues(10, 20, "", "Label", "", "", LLStyle::Params(), "", "", false);
+		match.setValues(10, 20, "", "Label", "", "", LLStyle::Params(), "", "");
 		ensure_equals("getLabel() == 'Label'", match.getLabel(), "Label");
 
-		match.setValues(10, 20, "", "", "", "", LLStyle::Params(), "", "", false);
+		match.setValues(10, 20, "", "", "", "", LLStyle::Params(), "", "");
 		ensure_equals("getLabel() == '' (2)", match.getLabel(), "");
 	}
 
@@ -247,10 +247,10 @@ namespace tut
 		LLUrlMatch match;
 		ensure_equals("getTooltip() == ''", match.getTooltip(), "");
 
-		match.setValues(10, 20, "", "", "Info", "", LLStyle::Params(), "", "", false);
+		match.setValues(10, 20, "", "", "Info", "", LLStyle::Params(), "", "");
 		ensure_equals("getTooltip() == 'Info'", match.getTooltip(), "Info");
 
-		match.setValues(10, 20, "", "", "", "", LLStyle::Params(), "", "", false);
+		match.setValues(10, 20, "", "", "", "", LLStyle::Params(), "", "");
 		ensure_equals("getTooltip() == '' (2)", match.getTooltip(), "");
 	}
 
@@ -263,10 +263,10 @@ namespace tut
 		LLUrlMatch match;
 		ensure_equals("getIcon() == ''", match.getIcon(), "");
 
-		match.setValues(10, 20, "", "", "", "Icon", LLStyle::Params(), "", "", false);
+		match.setValues(10, 20, "", "", "", "Icon", LLStyle::Params(), "", "");
 		ensure_equals("getIcon() == 'Icon'", match.getIcon(), "Icon");
 
-		match.setValues(10, 20, "", "", "", "", LLStyle::Params(), "", "", false);
+		match.setValues(10, 20, "", "", "", "", LLStyle::Params(), "", "");
 		ensure_equals("getIcon() == '' (2)", match.getIcon(), "");
 	}
 
@@ -279,10 +279,10 @@ namespace tut
 		LLUrlMatch match;
 		ensure("getMenuName() empty", match.getMenuName().empty());
 
-		match.setValues(10, 20, "", "", "", "Icon", LLStyle::Params(), "xui_file.xml", "", false);
+		match.setValues(10, 20, "", "", "", "Icon", LLStyle::Params(), "xui_file.xml", "");
 		ensure_equals("getMenuName() == \"xui_file.xml\"", match.getMenuName(), "xui_file.xml");
 
-		match.setValues(10, 20, "", "", "", "", LLStyle::Params(), "", "", false);
+		match.setValues(10, 20, "", "", "", "", LLStyle::Params(), "", "");
 		ensure("getMenuName() empty (2)", match.getMenuName().empty());
 	}
 
@@ -295,10 +295,10 @@ namespace tut
 		LLUrlMatch match;
 		ensure("getLocation() empty", match.getLocation().empty());
 
-		match.setValues(10, 20, "", "", "", "Icon", LLStyle::Params(), "xui_file.xml", "Paris", false);
+		match.setValues(10, 20, "", "", "", "Icon", LLStyle::Params(), "xui_file.xml", "Paris");
 		ensure_equals("getLocation() == \"Paris\"", match.getLocation(), "Paris");
 
-		match.setValues(10, 20, "", "", "", "", LLStyle::Params(), "", "", false);
+		match.setValues(10, 20, "", "", "", "", LLStyle::Params(), "", "");
 		ensure("getLocation() empty (2)", match.getLocation().empty());
 	}
 }