Cleanup excess code and gURLProtocolWhitelist, add isWhitelistedProtocol()

# Conflicts:
#	indra/llwindow/llwindowmacosx.cpp
#	indra/llwindow/llwindowsdl2.cpp
This commit is contained in:
Lirusaito
2019-03-19 02:41:31 -04:00
parent 627c0a6b57
commit 45228f920d
5 changed files with 705 additions and 2450 deletions

View File

@@ -3377,18 +3377,7 @@ void LLWindowWin32::ShellEx(const std::string& command)
void LLWindowWin32::spawnWebBrowser(const std::string& escaped_url, bool async)
{
bool found = false;
S32 i;
for (i = 0; i < gURLProtocolWhitelistCount; i++)
{
if (escaped_url.find(gURLProtocolWhitelist[i]) == 0)
{
found = true;
break;
}
}
if (!found)
if (!isWhitelistedProtocol(escaped_url))
{
LL_WARNS("Window") << "spawn_web_browser() called for url with protocol not on whitelist: " << escaped_url << LL_ENDL;
return;