summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermedia.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llviewermedia.cpp')
-rw-r--r--indra/newview/llviewermedia.cpp19
1 files changed, 18 insertions, 1 deletions
diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp
index ef596f9297..04d67fe750 100644
--- a/indra/newview/llviewermedia.cpp
+++ b/indra/newview/llviewermedia.cpp
@@ -1246,7 +1246,24 @@ void LLViewerMediaImpl::loadURI()
{
if(mMediaSource)
{
- mMediaSource->loadURI( mMediaURL );
+ // *HACK: we don't know if the URI coming in is properly escaped
+ // (the contract doesn't specify whether it is escaped or not.
+ // but LLQtWebKit expects it to be, so we do our best to encode
+ // special characters)
+ // The strings below were taken right from http://www.ietf.org/rfc/rfc1738.txt
+ // Note especially that '%' and '/' are there.
+ std::string uri = LLURI::escape(mMediaURL,
+ "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
+ "0123456789"
+ "$-_.+"
+ "!*'(),"
+ "{}|\\^~[]`"
+ "<>#%"
+ ";/?:@&=",
+ false);
+ llinfos << "Asking media source to load URI: " << uri << llendl;
+
+ mMediaSource->loadURI( uri );
if(mPreviousMediaState == MEDIA_PLAYING)
{