diff options
| author | Brett Joseph <bjoseph@vivox.com> | 2015-05-11 09:52:18 -0400 |
|---|---|---|
| committer | Brett Joseph <bjoseph@vivox.com> | 2015-05-11 09:52:18 -0400 |
| commit | 43b7fe66db159faaa84d545f97818e7a6f0f6920 (patch) | |
| tree | 6581ed36e716f6aa57b01f2861d6812294fb2261 /indra/newview/llweb.cpp | |
| parent | 7cc3e9b3cf8d70fce2ba0d4a398824e599fc8c5d (diff) | |
| parent | e611e35e033e99f619b0e4938f6879c8e387efd5 (diff) | |
Merged lindenlab/viewer-tools-update into default
Diffstat (limited to 'indra/newview/llweb.cpp')
| -rwxr-xr-x | indra/newview/llweb.cpp | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/indra/newview/llweb.cpp b/indra/newview/llweb.cpp index 0f0d9ce703..0be6e49834 100755 --- a/indra/newview/llweb.cpp +++ b/indra/newview/llweb.cpp @@ -49,7 +49,7 @@ #include "llviewerregion.h" #include "llviewerwindow.h" #include "llnotificationsutil.h" - +#include "lluriparser.h" #include "uriparser/Uri.h" #include <boost/regex.hpp> @@ -240,19 +240,10 @@ bool LLWeb::useExternalBrowser(const std::string &url) } else if (gSavedSettings.getU32("PreferredBrowserBehavior") == BROWSER_INT_LL_EXT_OTHERS) { - UriParserStateA state; - UriUriA uri; - state.uri = &uri; - - std::string uri_string = url; - uriParseUriA(&state, uri_string.c_str()); - if (uri.hostText.first) - { - S32 length = uri.hostText.afterLast - uri.hostText.first; - std::string buf = uri.hostText.first; - uri_string = buf.substr(0,length); - } - uriFreeUriMembersA(&uri); + LLUriParser up(url); + up.normalize(); + up.extractParts(); + std::string uri_string = up.host(); boost::regex pattern = boost::regex("\\b(lindenlab.com|secondlife.com)$", boost::regex::perl|boost::regex::icase); boost::match_results<std::string::const_iterator> matches; |
