summaryrefslogtreecommitdiff
path: root/indra/newview/llweb.cpp
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2015-04-14 13:46:01 -0700
committerMerov Linden <merov@lindenlab.com>2015-04-14 13:46:01 -0700
commitd631f2fd4daed5e3b10fc6dc290aa16f3d0591f0 (patch)
treeafc5139a2d530bdca9233308d2b6d6d4532bc6c4 /indra/newview/llweb.cpp
parent5411f349e5ed8835d5c99dbfb19a0934a6e5e28f (diff)
parenta49e11efd9e249cc6d3cf5bcffaafe1e831f2fa9 (diff)
Pull merge from lindenlab/viewer-tools-update (includes viewer-release)
Diffstat (limited to 'indra/newview/llweb.cpp')
-rwxr-xr-xindra/newview/llweb.cpp19
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;