diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp
index 30e6c6248e450b3525978091b5a8b02957753b8a..8906a6e736f11bdcefe13792cd840e2e44083343 100755
--- a/indra/llui/lltextbase.cpp
+++ b/indra/llui/lltextbase.cpp
@@ -2038,7 +2038,7 @@ void LLTextBase::appendTextImpl(const std::string &new_text, const LLStyle::Para
 		LLUrlMatch match;
 		std::string text = new_text;
 		while ( LLUrlRegistry::instance().findUrl(text, match,
-				boost::bind(&LLTextBase::replaceUrl, this, _1, _2, _3)) )
+				boost::bind(&LLTextBase::replaceUrl, this, _1, _2, _3),isContentTrusted()))
 		{
 			start = match.getStart();
 			end = match.getEnd()+1;
@@ -2075,7 +2075,7 @@ void LLTextBase::appendTextImpl(const std::string &new_text, const LLStyle::Para
 					}
 			}
 
-			LLTextUtil::processUrlMatch(&match,this);
+			LLTextUtil::processUrlMatch(&match,this,isContentTrusted());
 
 			// move on to the rest of the text after the Url
 			if (end < (S32)text.length()) 
diff --git a/indra/llui/lltextbase.h b/indra/llui/lltextbase.h
index d1f66b6cfe002fb28fa65b8d6328b61f6e3ed43f..ecbfdaf84c0c34e95a00d157ce231b6361c60d5e 100755
--- a/indra/llui/lltextbase.h
+++ b/indra/llui/lltextbase.h
@@ -367,7 +367,9 @@ class LLTextBase
 	bool					getWordWrap() { return mWordWrap; }
 	bool					getUseEllipses() { return mUseEllipses; }
 	bool					truncate(); // returns true of truncation occurred
+
 	bool					isContentTrusted() {return mTrustedContent;}
+	void					setContentTrusted(bool trusted_content) { mTrustedContent = trusted_content; }
 
 	// TODO: move into LLTextSegment?
 	void					createUrlContextMenu(S32 x, S32 y, const std::string &url); // create a popup context menu for the given Url
diff --git a/indra/llui/lltextutil.cpp b/indra/llui/lltextutil.cpp
index 4df2c3363f333f7bfdcedab1712b94ea5401172f..fff04b34f28d68b6df80c1268da80c85da02cf30 100755
--- a/indra/llui/lltextutil.cpp
+++ b/indra/llui/lltextutil.cpp
@@ -72,7 +72,7 @@ const std::string& LLTextUtil::formatPhoneNumber(const std::string& phone_str)
 	return formatted_phone_str;
 }
 
-bool LLTextUtil::processUrlMatch(LLUrlMatch* match,LLTextBase* text_base)
+bool LLTextUtil::processUrlMatch(LLUrlMatch* match,LLTextBase* text_base, bool is_content_trusted)
 {
 	if (match == 0 || text_base == 0)
 		return false;
@@ -85,7 +85,7 @@ bool LLTextUtil::processUrlMatch(LLUrlMatch* match,LLTextBase* text_base)
 	}
 
 	// output an optional icon before the Url
-	if (!match->getIcon().empty() )
+	if (is_content_trusted && !match->getIcon().empty() )
 	{
 		LLUIImagePtr image = LLUI::getUIImage(match->getIcon());
 		if (image)
diff --git a/indra/llui/lltextutil.h b/indra/llui/lltextutil.h
index bf7dbb58ce0144930352012cc3678ef5c412d6c6..798f14d086bf5f0a9f3eb76d7e8f5dc9bf69664d 100755
--- a/indra/llui/lltextutil.h
+++ b/indra/llui/lltextutil.h
@@ -64,7 +64,7 @@ namespace LLTextUtil
 	 */
 	const std::string& formatPhoneNumber(const std::string& phone_str);
 
-	bool processUrlMatch(LLUrlMatch* match,LLTextBase* text_base);
+	bool processUrlMatch(LLUrlMatch* match,LLTextBase* text_base, bool is_content_trusted);
 
 	class TextHelpers
 	{
diff --git a/indra/llui/llurlregistry.cpp b/indra/llui/llurlregistry.cpp
index 523ee5d78c6534c1682d4aee4f166b52c92b4bab..bccc646821198499fedad53d6dba908748809941 100755
--- a/indra/llui/llurlregistry.cpp
+++ b/indra/llui/llurlregistry.cpp
@@ -41,7 +41,8 @@ LLUrlRegistry::LLUrlRegistry()
 
 	// Urls are matched in the order that they were registered
 	registerUrl(new LLUrlEntryNoLink());
-	registerUrl(new LLUrlEntryIcon());
+	mUrlEntryIcon = new LLUrlEntryIcon();
+	registerUrl(mUrlEntryIcon);
 	registerUrl(new LLUrlEntrySLURL());
 	registerUrl(new LLUrlEntryHTTP());
 	registerUrl(new LLUrlEntryHTTPLabel());
@@ -145,7 +146,7 @@ static bool stringHasUrl(const std::string &text)
 			text.find("<icon") != std::string::npos);
 }
 
-bool LLUrlRegistry::findUrl(const std::string &text, LLUrlMatch &match, const LLUrlLabelCallback &cb)
+bool LLUrlRegistry::findUrl(const std::string &text, LLUrlMatch &match, const LLUrlLabelCallback &cb, bool is_content_trusted)
 {
 	// avoid costly regexes if there is clearly no URL in the text
 	if (! stringHasUrl(text))
@@ -160,6 +161,12 @@ bool LLUrlRegistry::findUrl(const std::string &text, LLUrlMatch &match, const LL
 	std::vector<LLUrlEntryBase *>::iterator it;
 	for (it = mUrlEntry.begin(); it != mUrlEntry.end(); ++it)
 	{
+		//Skip for url entry icon if content is not trusted
+		if(!is_content_trusted && (mUrlEntryIcon == *it))
+		{
+			continue;
+		}
+
 		LLUrlEntryBase *url_entry = *it;
 
 		U32 start = 0, end = 0;
diff --git a/indra/llui/llurlregistry.h b/indra/llui/llurlregistry.h
index da16171a9753f9c0c76fc2ab573481d45dcbc888..6270df1bbbf22a7cb57733aded8bbd4dc28d205d 100755
--- a/indra/llui/llurlregistry.h
+++ b/indra/llui/llurlregistry.h
@@ -73,7 +73,8 @@ class LLUrlRegistry : public LLSingleton<LLUrlRegistry>
 	/// get the next Url in an input string, starting at a given character offset
 	/// your callback is invoked if the matched Url's label changes in the future
 	bool findUrl(const std::string &text, LLUrlMatch &match,
-				 const LLUrlLabelCallback &cb = &LLUrlRegistryNullCallback);
+				 const LLUrlLabelCallback &cb = &LLUrlRegistryNullCallback,
+				 bool is_content_trusted = false);
 
 	/// a slightly less efficient version of findUrl for wide strings
 	bool findUrl(const LLWString &text, LLUrlMatch &match,
@@ -92,6 +93,7 @@ class LLUrlRegistry : public LLSingleton<LLUrlRegistry>
 	friend class LLSingleton<LLUrlRegistry>;
 
 	std::vector<LLUrlEntryBase *> mUrlEntry;
+	LLUrlEntryBase*	mUrlEntryIcon;
 };
 
 #endif
diff --git a/indra/newview/llchatitemscontainerctrl.cpp b/indra/newview/llchatitemscontainerctrl.cpp
index fd4f17b69439ab3321af1c0626c7e5d60d570340..cfc62c07b6e073a8ee36e930cb74ec6fcd465a1c 100755
--- a/indra/newview/llchatitemscontainerctrl.cpp
+++ b/indra/newview/llchatitemscontainerctrl.cpp
@@ -29,7 +29,6 @@
 #include "llchatitemscontainerctrl.h"
 #include "lltextbox.h"
 
-#include "llchatmsgbox.h"
 #include "llavatariconctrl.h"
 #include "llcommandhandler.h"
 #include "llfloaterreg.h"
@@ -130,7 +129,6 @@ void LLFloaterIMNearbyChatToastPanel::addMessage(LLSD& notification)
 {
 	std::string		messageText = notification["message"].asString();		// UTF-8 line of text
 
-	LLChatMsgBox* msg_text = getChild<LLChatMsgBox>("msg_text", false);
 
 	std::string color_name = notification["text_color"].asString();
 	
@@ -171,7 +169,7 @@ void LLFloaterIMNearbyChatToastPanel::addMessage(LLSD& notification)
 		{
 			style_params.font.style = "ITALIC";
 		}
-		msg_text->appendText(messageText, TRUE, style_params);
+		mMsgText->appendText(messageText, TRUE, style_params);
 	}
 
 	snapToMessageHeight();
@@ -204,9 +202,10 @@ void LLFloaterIMNearbyChatToastPanel::init(LLSD& notification)
 		case 2:	messageFont = LLFontGL::getFontSansSerifBig();	break;
 	}
 	
-	LLChatMsgBox* msg_text = getChild<LLChatMsgBox>("msg_text", false);
+	mMsgText = getChild<LLChatMsgBox>("msg_text", false);
+	mMsgText->setContentTrusted(false);
 
-	msg_text->setText(std::string(""));
+	mMsgText->setText(std::string(""));
 
 	if ( notification["chat_style"].asInteger() != CHAT_STYLE_IRC )
 	{
@@ -232,12 +231,12 @@ void LLFloaterIMNearbyChatToastPanel::init(LLSD& notification)
 			style_params_name.link_href = notification["sender_slurl"].asString();
 			style_params_name.is_link = true;
 
-			msg_text->appendText(str_sender, FALSE, style_params_name);
+			mMsgText->appendText(str_sender, FALSE, style_params_name);
 
 		}
 		else
 		{
-			msg_text->appendText(str_sender, false);
+			mMsgText->appendText(str_sender, false);
 		}
 	}
 
@@ -264,7 +263,7 @@ void LLFloaterIMNearbyChatToastPanel::init(LLSD& notification)
 		{
 			style_params.font.style = "ITALIC";
 		}
-		msg_text->appendText(messageText, FALSE, style_params);
+		mMsgText->appendText(messageText, FALSE, style_params);
 	}
 
 
@@ -275,8 +274,7 @@ void LLFloaterIMNearbyChatToastPanel::init(LLSD& notification)
 
 void	LLFloaterIMNearbyChatToastPanel::snapToMessageHeight	()
 {
-	LLChatMsgBox* text_box = getChild<LLChatMsgBox>("msg_text", false);
-	S32 new_height = llmax (text_box->getTextPixelHeight() + 2*text_box->getVPad() + 2*msg_height_pad, 25);
+	S32 new_height = llmax (mMsgText->getTextPixelHeight() + 2*mMsgText->getVPad() + 2*msg_height_pad, 25);
 	
 	LLRect panel_rect = getRect();
 
@@ -312,14 +310,13 @@ BOOL	LLFloaterIMNearbyChatToastPanel::handleMouseUp	(S32 x, S32 y, MASK mask)
 		return LLPanel::handleMouseUp(x,y,mask);
     */
 
-	LLChatMsgBox* text_box = getChild<LLChatMsgBox>("msg_text", false);
-	S32 local_x = x - text_box->getRect().mLeft;
-	S32 local_y = y - text_box->getRect().mBottom;
+	S32 local_x = x - mMsgText->getRect().mLeft;
+	S32 local_y = y - mMsgText->getRect().mBottom;
 	
 	//if text_box process mouse up (ussually this is click on url) - we didn't show nearby_chat.
-	if (text_box->pointInView(local_x, local_y) )
+	if (mMsgText->pointInView(local_x, local_y) )
 	{
-		if (text_box->handleMouseUp(local_x,local_y,mask) == TRUE)
+		if (mMsgText->handleMouseUp(local_x,local_y,mask) == TRUE)
 			return TRUE;
 		else
 		{
diff --git a/indra/newview/llchatitemscontainerctrl.h b/indra/newview/llchatitemscontainerctrl.h
index 54b6499d52ff721768d9769625608094c1157b7e..f66670ec8c83a91c3ac61fce643b925261906abb 100755
--- a/indra/newview/llchatitemscontainerctrl.h
+++ b/indra/newview/llchatitemscontainerctrl.h
@@ -28,6 +28,7 @@
 #define LL_LLCHATITEMSCONTAINERCTRL_H_
 
 #include "llchat.h"
+#include "llchatmsgbox.h"
 #include "llpanel.h"
 #include "llscrollbar.h"
 #include "llviewerchat.h"
@@ -85,6 +86,7 @@ class LLFloaterIMNearbyChatToastPanel : public LLPanel
 	LLUUID			mFromID;	// agent id or object id
 	std::string		mFromName;
 	EChatSourceType	mSourceType;
+	LLChatMsgBox* 	mMsgText;
 	
 
 
diff --git a/indra/newview/lltoastimpanel.cpp b/indra/newview/lltoastimpanel.cpp
index a27105e22d8dcdbb4610775f12b8278c6a7fabbb..39adfb3431252c9a9425fdbffa0f64da9401b173 100755
--- a/indra/newview/lltoastimpanel.cpp
+++ b/indra/newview/lltoastimpanel.cpp
@@ -54,6 +54,7 @@ LLToastIMPanel::LLToastIMPanel(LLToastIMPanel::Params &p) :	LLToastPanel(p.notif
 	mAvatarName = getChild<LLTextBox>("user_name");
 	mTime = getChild<LLTextBox>("time_box");
 	mMessage = getChild<LLTextBox>("message");
+	mMessage->setContentTrusted(false);
 
 	LLStyle::Params style_params;
 	LLFontGL* fontp = LLViewerChat::getChatFont();
diff --git a/indra/newview/lltoastnotifypanel.cpp b/indra/newview/lltoastnotifypanel.cpp
index 51935dc03be8e63ce3ac14377dbe44592e2b7e23..907baf0661901f785d7b393b8354ee7672ea025d 100755
--- a/indra/newview/lltoastnotifypanel.cpp
+++ b/indra/newview/lltoastnotifypanel.cpp
@@ -270,8 +270,12 @@ void LLToastNotifyPanel::init( LLRect rect, bool show_images )
     // customize panel's attributes
     // is it intended for displaying a tip?
     mIsTip = mNotification->getType() == "notifytip";
+
+    std::string notif_name = mNotification->getName();
     // is it a script dialog?
-    mIsScriptDialog = (mNotification->getName() == "ScriptDialog" || mNotification->getName() == "ScriptDialogGroup");
+    mIsScriptDialog = (notif_name == "ScriptDialog" || notif_name == "ScriptDialogGroup");
+
+    bool is_content_trusted = (notif_name != "LoadWebPage");
     // is it a caution?
     //
     // caution flag can be set explicitly by specifying it in the notification payload, or it can be set implicitly if the
@@ -314,6 +318,7 @@ void LLToastNotifyPanel::init( LLRect rect, bool show_images )
     mTextBox->setMaxTextLength(MAX_LENGTH);
     mTextBox->setVisible(TRUE);
     mTextBox->setPlainText(!show_images);
+    mTextBox->setContentTrusted(is_content_trusted);
     mTextBox->setValue(mNotification->getMessage());
 	mTextBox->setIsFriendCallback(LLAvatarActions::isFriend);