summaryrefslogtreecommitdiff
path: root/indra/llui/llurlregistry.cpp
diff options
context:
space:
mode:
authorGraham Madarasz <graham@lindenlab.com>2018-03-06 09:48:44 -0800
committerGraham Madarasz <graham@lindenlab.com>2018-03-06 09:48:44 -0800
commitb9016f99f3abf8b135942e60a5a2d8cd8f0f4e75 (patch)
tree7e0dc18306309254b5d8cd5f40ac6ce897409242 /indra/llui/llurlregistry.cpp
parentf8134b152d1a7273e27a224eac11d52c0a6f94c9 (diff)
parentaf9069edbff9df73cd75753b696aabd1ae8769b5 (diff)
Merged lindenlab/viewer-cougar into default
Diffstat (limited to 'indra/llui/llurlregistry.cpp')
-rw-r--r--indra/llui/llurlregistry.cpp35
1 files changed, 3 insertions, 32 deletions
diff --git a/indra/llui/llurlregistry.cpp b/indra/llui/llurlregistry.cpp
index fa6593267a..ba6fa1e2e9 100644
--- a/indra/llui/llurlregistry.cpp
+++ b/indra/llui/llurlregistry.cpp
@@ -212,7 +212,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)
{
@@ -223,33 +223,6 @@ bool LLUrlRegistry::findUrl(const std::string &text, LLUrlMatch &match, const LL
// fill in the LLUrlMatch object and return it
std::string url = text.substr(match_start, match_end - match_start + 1);
- LLUrlEntryBase *stripped_entry = NULL;
- if((match_entry != mUrlEntryNoLink) && (match_entry != mUrlEntryHTTPLabel) && (match_entry !=mUrlEntrySLLabel)
- && LLStringUtil::containsNonprintable(url))
- {
- LLStringUtil::stripNonprintable(url);
-
- std::vector<LLUrlEntryBase *>::iterator iter;
- for (iter = mUrlEntry.begin(); iter != mUrlEntry.end(); ++iter)
- {
- LLUrlEntryBase *url_entry = *iter;
- U32 start = 0, end = 0;
- if (matchRegex(url.c_str(), url_entry->getPattern(), start, end))
- {
- if (mLLUrlEntryInvalidSLURL == *iter)
- {
- if(url_entry && url_entry->isSLURLvalid(url))
- {
- continue;
- }
- }
- stripped_entry = url_entry;
- break;
- }
- }
- }
-
-
if (match_entry == mUrlEntryTrusted)
{
LLUriParser up(url);
@@ -257,12 +230,10 @@ bool LLUrlRegistry::findUrl(const std::string &text, LLUrlMatch &match, const LL
url = up.normalizedUri();
}
- std::string url_label = stripped_entry? stripped_entry->getLabel(url, cb) : match_entry->getLabel(url, cb);
- std::string url_query = stripped_entry? stripped_entry->getQuery(url) : match_entry->getQuery(url);
match.setValues(match_start, match_end,
match_entry->getUrl(url),
- url_label,
- url_query,
+ match_entry->getLabel(url, cb),
+ match_entry->getQuery(url),
match_entry->getTooltip(url),
match_entry->getIcon(url),
match_entry->getStyle(),