From 072e303c82a8248293d5d3e4c0cd73fcc88e3ffa Mon Sep 17 00:00:00 2001 From: Ansariel Date: Mon, 4 May 2015 13:55:09 +0200 Subject: [PATCH] More banging at URI things: Want to show the full URI in the console as well... --- indra/llui/llconsole.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/indra/llui/llconsole.cpp b/indra/llui/llconsole.cpp index df3d663278..300259c128 100755 --- a/indra/llui/llconsole.cpp +++ b/indra/llui/llconsole.cpp @@ -598,8 +598,18 @@ LLConsole::Paragraph::Paragraph (LLWString str, const LLColor4 &color, F32 add_t while (LLUrlRegistry::instance().findUrl(workLine, urlMatch, boost::bind(&LLConsole::onUrlLabelCallback, console, mID, _1, _2)) && !urlMatch.getUrl().empty()) { - LLWStringUtil::replaceString(mParagraphText, utf8str_to_wstring(urlMatch.getUrl()), utf8str_to_wstring(urlMatch.getLabel())); - mUrlLabels[urlMatch.getUrl()] = urlMatch.getLabel(); + // Special case for LLUrlEntryHTTP, LLUrlEntryHTTPNoProtocol and + // LLUrlEntrySecondlifeURL: getLabel() only returns host part, but + // we also want the query part + std::string label = urlMatch.getLabel(); + std::string query = urlMatch.getQuery(); + if (!query.empty()) + { + label += query; + } + + LLWStringUtil::replaceString(mParagraphText, utf8str_to_wstring(urlMatch.getUrl()), utf8str_to_wstring(label)); + mUrlLabels[urlMatch.getUrl()] = label; // Remove the URL from the work line so we don't end in a loop in case of regular URLs! // findUrl will always return the very first URL in a string