diff options
author | Rider Linden <rider@lindenlab.com> | 2015-04-14 09:34:49 -0700 |
---|---|---|
committer | Rider Linden <rider@lindenlab.com> | 2015-04-14 09:34:49 -0700 |
commit | 82ae214f6a367e17dd335e80e2444cf672108821 (patch) | |
tree | 5a2ebb115b0674698cfb0d9cbd879add63d88ece /indra/newview/llweb.cpp | |
parent | fe8dec32dbdd6085dd582c49134551638561ca0e (diff) | |
parent | a49e11efd9e249cc6d3cf5bcffaafe1e831f2fa9 (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; |