From 89ce328ba58db2a5443eb0035a8cb82726bb7e6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Thu, 26 Mar 2020 23:31:52 -0400 Subject: [PATCH] Fix script dialogs showing UI SLURLs when SinguReplaceLinks is false All interface SLURLs should be force replaced. Also fixes text boxes not respecting setting at all --- indra/newview/llnotify.cpp | 4 +++- indra/newview/llviewermessage.cpp | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/indra/newview/llnotify.cpp b/indra/newview/llnotify.cpp index 6866643ec..17a6b28ef 100644 --- a/indra/newview/llnotify.cpp +++ b/indra/newview/llnotify.cpp @@ -224,7 +224,9 @@ LLNotifyBox::LLNotifyBox(LLNotificationPtr notification) if (!mIsCaution || !mIsTip) // We could do some extra color math here to determine if bg's too close to link color, but let's just cross with the link color instead mText->setLinkColor(new LLColor4(lerp(text_color, gSavedSettings.getColor4("HTMLLinkColor"), 0.4f))); mText->setTabStop(FALSE); // can't tab to it (may be a problem for scrolling via keyboard) - mText->appendText(message,false,false,style,!layout_script_dialog); // Now we can set the text, since colors have been set. + mText->appendText(message,false,false,style); // Now we can set the text, since colors have been set. + if (is_textbox || layout_script_dialog) + mText->appendText(notification->getSubstitutions()["SCRIPT_MESSAGE"], false, true, style, false); addChild(mText); } diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index e18c66c84..2a0758ba4 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -7020,7 +7020,8 @@ void process_script_dialog(LLMessageSystem* msg, void**) LLSD args; args["TITLE"] = object_name; - args["MESSAGE"] = message; + args["MESSAGE"] = LLStringUtil::null; + args["SCRIPT_MESSAGE"] = message; args["CHANNEL"] = chat_channel; LLNotificationPtr notification; char const* name = (is_group && !is_text_box) ? "GROUPNAME" : "NAME";