summaryrefslogtreecommitdiff
path: root/indra/newview/llappviewermacosx.cpp
diff options
context:
space:
mode:
authorMelinda Green <melinda@lindenlab.com>2008-12-15 21:21:19 +0000
committerMelinda Green <melinda@lindenlab.com>2008-12-15 21:21:19 +0000
commite1d8dac25a93db837c780428a23f81cbf9109270 (patch)
treea0bcaec0cec1ba6b3ce813764650eada61fcde4f /indra/newview/llappviewermacosx.cpp
parent9c0dbb123376608e464fcd8d1a2e288e01d78a3f (diff)
svn merge -r105329:105903 svn+ssh://svn/svn/linden/branches/featurettes/featurettes-batch4-merge
Resolving QAR-1051 Merge featurettes batch #4
Diffstat (limited to 'indra/newview/llappviewermacosx.cpp')
-rw-r--r--indra/newview/llappviewermacosx.cpp20
1 files changed, 18 insertions, 2 deletions
diff --git a/indra/newview/llappviewermacosx.cpp b/indra/newview/llappviewermacosx.cpp
index bad4746870..81990b0464 100644
--- a/indra/newview/llappviewermacosx.cpp
+++ b/indra/newview/llappviewermacosx.cpp
@@ -48,6 +48,9 @@
#include "llurldispatcher.h"
#include <Carbon/Carbon.h>
#include "lldir.h"
+
+class LLWebBrowserCtrl; // for LLURLDispatcher
+
namespace
{
// The command line args stored.
@@ -260,8 +263,21 @@ OSErr AEGURLHandler(const AppleEvent *messagein, AppleEvent *reply, long refIn)
if(result == noErr)
{
std::string url = buffer;
- const bool from_external_browser = true;
- LLURLDispatcher::dispatch(url, from_external_browser);
+
+ // Safari 3.2 silently mangles secondlife:///app/ URLs into
+ // secondlife:/app/ (only one leading slash).
+ // Fix them up to meet the URL specification. JC
+ const std::string prefix = "secondlife:/app/";
+ std::string test_prefix = url.substr(0, prefix.length());
+ LLStringUtil::toLower(test_prefix);
+ if (test_prefix == prefix)
+ {
+ url.replace(0, prefix.length(), "secondlife:///app/");
+ }
+
+ LLWebBrowserCtrl* web = NULL;
+ const bool trusted_browser = false;
+ LLURLDispatcher::dispatch(url, web, trusted_browser);
}
return(result);