summaryrefslogtreecommitdiff
path: root/indra/newview/llweb.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llweb.cpp')
-rwxr-xr-xindra/newview/llweb.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/indra/newview/llweb.cpp b/indra/newview/llweb.cpp
index 0312972a22..0be6e49834 100755
--- a/indra/newview/llweb.cpp
+++ b/indra/newview/llweb.cpp
@@ -49,6 +49,8 @@
#include "llviewerregion.h"
#include "llviewerwindow.h"
#include "llnotificationsutil.h"
+#include "lluriparser.h"
+#include "uriparser/Uri.h"
#include <boost/regex.hpp>
@@ -238,9 +240,14 @@ bool LLWeb::useExternalBrowser(const std::string &url)
}
else if (gSavedSettings.getU32("PreferredBrowserBehavior") == BROWSER_INT_LL_EXT_OTHERS)
{
- boost::regex pattern = boost::regex("\\b(lindenlab.com|secondlife.com)\\b", boost::regex::perl|boost::regex::icase);
+ 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;
- return !(boost::regex_search(url, matches, pattern));
+ return !(boost::regex_search(uri_string, matches, pattern));
}
return false;
}