diff options
author | Oz Linden <oz@lindenlab.com> | 2015-04-14 05:39:36 -0400 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2015-04-14 05:39:36 -0400 |
commit | 034fb74d05d25582ebdc086414cb0307b1e2e8e2 (patch) | |
tree | d1c5e85e0f35782517921e1d80269cb23a511e97 /indra/newview | |
parent | bef5a95cafdf6e20a243f4091b4fbcf426fb529b (diff) | |
parent | 5a282abe184323643f1a88f2aba662648059b4e2 (diff) |
merge changes for STORM-2113
Diffstat (limited to 'indra/newview')
-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; |