summaryrefslogtreecommitdiff
path: root/indra/newview/llchathistory.cpp
diff options
context:
space:
mode:
authorLynx Linden <lynx@lindenlab.com>2010-02-02 17:20:01 +0000
committerLynx Linden <lynx@lindenlab.com>2010-02-02 17:20:01 +0000
commitf937153a01f1586e5345d8d08c5cba6cf806cde4 (patch)
tree9ec65cb5ef2a5b4ca89a773bfb8a2371638c91c1 /indra/newview/llchathistory.cpp
parentd51b7c4b346361e4a3d8ed90440f8cd1b247771e (diff)
parente563a07659b74b2dca850834a44c3b92ff993b44 (diff)
Automated merge with ssh://hg.lindenlab.com/viewer/viewer-2-0/
Diffstat (limited to 'indra/newview/llchathistory.cpp')
-rw-r--r--indra/newview/llchathistory.cpp19
1 files changed, 13 insertions, 6 deletions
diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp
index 581c210bd5..7c22ac9e36 100644
--- a/indra/newview/llchathistory.cpp
+++ b/indra/newview/llchathistory.cpp
@@ -579,19 +579,26 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL
url += "?name=" + chat.mFromName;
url += "&owner=" + args["owner_id"].asString();
- LLViewerRegion *region = LLWorld::getInstance()->getRegionFromPosAgent(chat.mPosAgent);
- if (region)
+ std::string slurl = args["slurl"].asString();
+ if (slurl.empty())
{
- S32 x, y, z;
- LLSLURL::globalPosToXYZ(LLVector3d(chat.mPosAgent), x, y, z);
- url += "&slurl=" + region->getName() + llformat("/%d/%d/%d", x, y, z);
+ LLViewerRegion *region = LLWorld::getInstance()->getRegionFromPosAgent(chat.mPosAgent);
+ if (region)
+ {
+ S32 x, y, z;
+ LLSLURL::globalPosToXYZ(LLVector3d(chat.mPosAgent), x, y, z);
+ slurl = region->getName() + llformat("/%d/%d/%d", x, y, z);
+ }
}
+ url += "&slurl=" + slurl;
// set the link for the object name to be the objectim SLapp
+ // (don't let object names with hyperlinks override our objectim Url)
LLStyle::Params link_params(style_params);
link_params.color.control = "HTMLLinkColor";
link_params.link_href = url;
- mEditor->appendText(chat.mFromName + delimiter, false, link_params);
+ mEditor->appendText("<nolink>" + chat.mFromName + "</nolink>" + delimiter,
+ false, link_params);
}
else if ( chat.mFromName != SYSTEM_FROM && chat.mFromID.notNull() )
{