summaryrefslogtreecommitdiff
path: root/indra/llui/lltextbase.cpp
diff options
context:
space:
mode:
authorLynx Linden <lynx@lindenlab.com>2010-01-29 14:30:26 +0000
committerLynx Linden <lynx@lindenlab.com>2010-01-29 14:30:26 +0000
commit4d6c9e3e1754d21ea5291207085113e99456f571 (patch)
tree3a74789a0d5573863bc2e40ab6b364e589bb8697 /indra/llui/lltextbase.cpp
parentec5dbb60e71302a77f68cc604e7dfd52bcaa926a (diff)
EXT-4678: Support <nolink>...</nolink> 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 <nolink> tag, e.g.: <nolink>secondlife.com</nolink>
Diffstat (limited to 'indra/llui/lltextbase.cpp')
-rw-r--r--indra/llui/lltextbase.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp
index 8abbc833e5..2ee2023875 100644
--- a/indra/llui/lltextbase.cpp
+++ b/indra/llui/lltextbase.cpp
@@ -1606,11 +1606,10 @@ void LLTextBase::appendText(const std::string &new_text, bool prepend_newline, c
}
}
- // output the styled Url (unless we've been asked to suppress it)
- if (isBlackListUrl(match.getUrl()))
+ // output the styled Url (unless we've been asked to suppress hyperlinking)
+ if (match.isLinkDisabled())
{
- std::string orig_url = text.substr(start, end-start);
- appendAndHighlightText(orig_url, prepend_newline, part, style_params);
+ appendAndHighlightText(match.getLabel(), prepend_newline, part, style_params);
}
else
{