diff options
| author | Oz Linden <oz@lindenlab.com> | 2015-03-23 22:39:18 -0400 |
|---|---|---|
| committer | Oz Linden <oz@lindenlab.com> | 2015-03-23 22:39:18 -0400 |
| commit | d6f7a16a686a32a3369661b8db35860e7cae6e8f (patch) | |
| tree | 07b0117b098fef20dd9ddc597e4c0599c4235a4d /indra/llui/llurlregistry.cpp | |
| parent | 7ba82a6409e4fc096407f0247b084950d1e3c14a (diff) | |
| parent | c489f1f8647a77c8c7d5fb5b721433dd72cb49c8 (diff) | |
merge changes for 3.7.26-release
Diffstat (limited to 'indra/llui/llurlregistry.cpp')
| -rwxr-xr-x | indra/llui/llurlregistry.cpp | 13 |
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; } |
