summaryrefslogtreecommitdiff
path: root/indra/llui/llurlregistry.cpp
diff options
context:
space:
mode:
authorAndreyL ProductEngine <andreylproductengine@lindenlab.com>2015-07-14 04:39:20 +0300
committerAndreyL ProductEngine <andreylproductengine@lindenlab.com>2015-07-14 04:39:20 +0300
commit078612e292fa8b66a8b7a68b7e1fe9b5049c3deb (patch)
tree8ba7d65f7b5a6519688b88eeac34f3e4ea6ef2dd /indra/llui/llurlregistry.cpp
parentca6a9d16354a55cc40f2ab22d7b8d13c66bfac08 (diff)
MAINT-5019 FIXED Additional cases
Diffstat (limited to 'indra/llui/llurlregistry.cpp')
-rwxr-xr-xindra/llui/llurlregistry.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/indra/llui/llurlregistry.cpp b/indra/llui/llurlregistry.cpp
index 5ad05a1c86..fcdb5b19d4 100755
--- a/indra/llui/llurlregistry.cpp
+++ b/indra/llui/llurlregistry.cpp
@@ -76,9 +76,10 @@ LLUrlRegistry::LLUrlRegistry()
registerUrl(new LLUrlEntrySL());
mUrlEntrySLLabel = new LLUrlEntrySLLabel();
registerUrl(mUrlEntrySLLabel);
- // most common pattern is a URL without any protocol,
- // e.g., "secondlife.com"
+ // most common pattern is a URL without any protocol starting with "www",
+ // e.g., "www.secondlife.com"
registerUrl(new LLUrlEntryHTTPNoProtocol());
+ registerUrl(new LLUrlEntryEmail());
}
LLUrlRegistry::~LLUrlRegistry()
@@ -155,11 +156,9 @@ static bool stringHasUrl(const std::string &text)
return (text.find("://") != std::string::npos ||
text.find("www.") != std::string::npos ||
text.find(".com") != std::string::npos ||
- text.find(".net") != std::string::npos ||
- text.find(".edu") != std::string::npos ||
- text.find(".org") != std::string::npos ||
text.find("<nolink>") != std::string::npos ||
- text.find("<icon") != std::string::npos);
+ text.find("<icon") != std::string::npos ||
+ text.find("@") != std::string::npos);
}
bool LLUrlRegistry::findUrl(const std::string &text, LLUrlMatch &match, const LLUrlLabelCallback &cb, bool is_content_trusted)
@@ -218,7 +217,7 @@ bool LLUrlRegistry::findUrl(const std::string &text, LLUrlMatch &match, const LL
// did we find a match? if so, return its details in the match object
if (match_entry)
{
- // Skip if link is an email. See MAINT-5371.
+ // Skip if link is an email with an empty username (starting with @). See MAINT-5371.
if (match_start > 0 && text.substr(match_start - 1, 1) == "@")
return false;