From 4d6c9e3e1754d21ea5291207085113e99456f571 Mon Sep 17 00:00:00 2001 From: Lynx Linden Date: Fri, 29 Jan 2010 14:30:26 +0000 Subject: EXT-4678: Support ... to turn off URL hyperlinking. We are running into a bunch of places where we don't want to allow hyperlinking of URLs like secondlife.com in text boxes. I've therefore added a new type of URL regex that disables URL hyperlinking. Simply enclose the URL in a tag, e.g.: secondlife.com --- indra/llui/llurlregistry.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'indra/llui/llurlregistry.cpp') diff --git a/indra/llui/llurlregistry.cpp b/indra/llui/llurlregistry.cpp index ad5c0911f8..55eb8950e9 100644 --- a/indra/llui/llurlregistry.cpp +++ b/indra/llui/llurlregistry.cpp @@ -44,6 +44,7 @@ void LLUrlRegistryNullCallback(const std::string &url, const std::string &label) LLUrlRegistry::LLUrlRegistry() { // Urls are matched in the order that they were registered + registerUrl(new LLUrlEntryNoLink()); registerUrl(new LLUrlEntrySLURL()); registerUrl(new LLUrlEntryHTTP()); registerUrl(new LLUrlEntryHTTPLabel()); @@ -176,7 +177,8 @@ bool LLUrlRegistry::findUrl(const std::string &text, LLUrlMatch &match, const LL match_entry->getIcon(), match_entry->getColor(), match_entry->getMenuName(), - match_entry->getLocation(url)); + match_entry->getLocation(url), + match_entry->isLinkDisabled()); return true; } @@ -204,9 +206,13 @@ bool LLUrlRegistry::findUrl(const LLWString &text, LLUrlMatch &match, const LLUr S32 end = start + wurl.size() - 1; match.setValues(start, end, match.getUrl(), - match.getLabel(), match.getTooltip(), - match.getIcon(), match.getColor(), - match.getMenuName(), match.getLocation()); + match.getLabel(), + match.getTooltip(), + match.getIcon(), + match.getColor(), + match.getMenuName(), + match.getLocation(), + match.isLinkDisabled()); return true; } return false; -- cgit v1.2.3