diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2014-10-09 10:41:30 -0400 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2014-10-09 10:41:30 -0400 |
commit | ed9685e41b1b91f63de1964661dacb0718f73186 (patch) | |
tree | 8a9c24df9f735b9a461bca0443b60f767a1e9ac7 /indra/llui/llurlentry.cpp | |
parent | 1c6b7e19792e02d0b6605ce5c1cae238405de463 (diff) | |
parent | d7db567f27e6cc30aaffaf38d6ea219a7adf4678 (diff) |
merge
Diffstat (limited to 'indra/llui/llurlentry.cpp')
-rwxr-xr-x | indra/llui/llurlentry.cpp | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp index 3ebf06eefa..c06d6144b9 100755 --- a/indra/llui/llurlentry.cpp +++ b/indra/llui/llurlentry.cpp @@ -31,14 +31,16 @@ #include "lluri.h" #include "llurlmatch.h" #include "llurlregistry.h" +#include "lluriparser.h" #include "llavatarnamecache.h" #include "llcachename.h" #include "lltrans.h" -#include "lltextutil.h" #include "lluicolortable.h" #include "message.h" +#include "uriparser/Uri.h" + #define APP_HEADER_REGEX "((x-grid-location-info://[-\\w\\.]+/app)|(secondlife:///app))" // Utility functions @@ -346,8 +348,8 @@ std::string LLUrlEntrySLURL::getLocation(const std::string &url) const // LLUrlEntrySeconlifeURLs Describes *secondlife.com and *lindenlab.com urls to substitute icon 'hand.png' before link // LLUrlEntrySeconlifeURL::LLUrlEntrySeconlifeURL() -{ - mPattern = boost::regex("\\b(https?://)?([-\\w\\.]*\\.)?(secondlife|lindenlab)\\.com\\S*", +{ + mPattern = boost::regex("\\b(https?://)?([-\\w\\.]*\\.)?(secondlife|lindenlab)\\.com(:\\d{1,5})?(/\\S*)?\\b", boost::regex::perl|boost::regex::icase); mIcon = "Hand"; @@ -356,19 +358,14 @@ LLUrlEntrySeconlifeURL::LLUrlEntrySeconlifeURL() std::string LLUrlEntrySeconlifeURL::getLabel(const std::string &url, const LLUrlLabelCallback &cb) { - std::string local_url(url); - - LLTextUtil::Uri uri; - LLTextUtil::normalizeUri(local_url, &uri); - - return uri.host; + LLUriParser up(url); + up.extractParts(); + return up.host(); } std::string LLUrlEntrySeconlifeURL::getTooltip(const std::string &url) const { - std::string local_url(url); - LLTextUtil::normalizeUri(local_url); - return local_url; + return url; } // |