aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llwebbrowserctrl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/llwebbrowserctrl.cpp')
-rw-r--r--linden/indra/newview/llwebbrowserctrl.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/linden/indra/newview/llwebbrowserctrl.cpp b/linden/indra/newview/llwebbrowserctrl.cpp
index 7fedc4c..afd27bf 100644
--- a/linden/indra/newview/llwebbrowserctrl.cpp
+++ b/linden/indra/newview/llwebbrowserctrl.cpp
@@ -42,7 +42,7 @@
42#include "llviewerwindow.h" 42#include "llviewerwindow.h"
43#include "llfloaterhtml.h" 43#include "llfloaterhtml.h"
44#include "llweb.h" 44#include "llweb.h"
45#include "viewer.h" 45#include "llurlsimstring.h"
46 46
47// linden library includes 47// linden library includes
48#include "llfocusmgr.h" 48#include "llfocusmgr.h"
@@ -544,6 +544,15 @@ void LLWebBrowserCtrl::onStatusTextChange( const EventType& eventIn )
544// virtual 544// virtual
545void LLWebBrowserCtrl::onLocationChange( const EventType& eventIn ) 545void LLWebBrowserCtrl::onLocationChange( const EventType& eventIn )
546{ 546{
547 const LLURI url(eventIn.getStringValue());
548 LLSD queryMap(url.queryMap());
549 std::string redirect_http_hack = queryMap["redirect-http-hack"].asString();
550 if (!redirect_http_hack.empty())
551 {
552 LLURLDispatcher::dispatch(redirect_http_hack);
553 return;
554 }
555
547 // chain this event on to observers of an instance of LLWebBrowserCtrl 556 // chain this event on to observers of an instance of LLWebBrowserCtrl
548 LLWebBrowserCtrlEvent event( eventIn.getStringValue() ); 557 LLWebBrowserCtrlEvent event( eventIn.getStringValue() );
549 mEventEmitter.update( &LLWebBrowserCtrlObserver::onLocationChange, event ); 558 mEventEmitter.update( &LLWebBrowserCtrlObserver::onLocationChange, event );
@@ -554,7 +563,6 @@ void LLWebBrowserCtrl::onLocationChange( const EventType& eventIn )
554void LLWebBrowserCtrl::onClickLinkHref( const EventType& eventIn ) 563void LLWebBrowserCtrl::onClickLinkHref( const EventType& eventIn )
555{ 564{
556 const std::string protocol( "http://" ); 565 const std::string protocol( "http://" );
557
558 if( mOpenLinksInExternalBrowser ) 566 if( mOpenLinksInExternalBrowser )
559 { 567 {
560 if ( eventIn.getStringValue().length() ) 568 if ( eventIn.getStringValue().length() )