summaryrefslogtreecommitdiff
path: root/indra/llui/llurlregistry.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2015-02-25 17:02:06 -0500
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2015-02-25 17:02:06 -0500
commit2ab9678455ce2e894273cae1efd2e10f4aaee42b (patch)
treece679a7b789d75a3d36816438c5a2fd5a5edfd1a /indra/llui/llurlregistry.cpp
parentd2de97ad8e84eedd42f4a0fe5b258617a96f154b (diff)
parent9b45bc992edf8d049d8a1abe2e778870a493295a (diff)
merge
Diffstat (limited to 'indra/llui/llurlregistry.cpp')
-rwxr-xr-xindra/llui/llurlregistry.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/indra/llui/llurlregistry.cpp b/indra/llui/llurlregistry.cpp
index ef0789e0e4..9e8d8d01f1 100755
--- a/indra/llui/llurlregistry.cpp
+++ b/indra/llui/llurlregistry.cpp
@@ -27,6 +27,7 @@
#include "linden_common.h"
#include "llurlregistry.h"
+#include "lluriparser.h"
#include <boost/regex.hpp>
@@ -44,6 +45,10 @@ LLUrlRegistry::LLUrlRegistry()
mUrlEntryIcon = new LLUrlEntryIcon();
registerUrl(mUrlEntryIcon);
registerUrl(new LLUrlEntrySLURL());
+
+ // decorated links for host names like: secondlife.com and lindenlab.com
+ registerUrl(new LLUrlEntrySeconlifeURL());
+
registerUrl(new LLUrlEntryHTTP());
mUrlEntryHTTPLabel = new LLUrlEntryHTTPLabel();
registerUrl(mUrlEntryHTTPLabel);
@@ -203,6 +208,11 @@ 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);
+
+ LLUriParser up(url);
+ up.normalize();
+ url = up.normalizedUri();
+
match.setValues(match_start, match_end,
match_entry->getUrl(url),
match_entry->getLabel(url, cb),
@@ -212,7 +222,8 @@ bool LLUrlRegistry::findUrl(const std::string &text, LLUrlMatch &match, const LL
match_entry->getMenuName(),
match_entry->getLocation(url),
match_entry->getID(url),
- match_entry->underlineOnHoverOnly(url));
+ match_entry->underlineOnHoverOnly(url),
+ match_entry->isTrusted());
return true;
}