diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp index 25400455b..344666112 100644 --- a/indra/llui/lltexteditor.cpp +++ b/indra/llui/lltexteditor.cpp @@ -4295,6 +4295,12 @@ void LLTextEditor::appendTextImpl(const std::string &new_text, const LLStyleSP s }; auto append_link = [&](const std::string& link, LLStyleSP link_style) { + if (!link_style->isLink()) + { + appendAndHighlightText(link, part, style); + return; + } + if (style) // Respect styling { const auto& text_style = *style; @@ -4432,7 +4438,7 @@ void LLTextEditor::appendAndHighlightText(const std::string& new_text, S32 highl std::string::size_type start = 0; /*std::string::size_type pos = new_text.find('\n',start); - while(pos!=-1) + while(pos != std::string::npos) { if(pos!=start) { diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp index 75d1c3b3e..debf53b2e 100644 --- a/indra/llui/llurlentry.cpp +++ b/indra/llui/llurlentry.cpp @@ -1430,8 +1430,9 @@ std::string LLUrlEntryNoLink::getLabel(const std::string &url, const LLUrlLabelC LLStyleSP LLUrlEntryNoLink::getStyle() const { // Don't render as URL (i.e. no context menu or hand cursor). - // Singu Note: What the heck? No, that's misleading!! - return LLUrlEntryBase::getStyle(); + LLStyleSP style(new LLStyle()); + style->setLinkHREF(" "); + return style; } @@ -1536,4 +1537,3 @@ std::string LLUrlEntryJira::getUrl(const std::string &url) const } // - diff --git a/indra/llui/llurlmatch.cpp b/indra/llui/llurlmatch.cpp index 717db6280..240e04ef0 100644 --- a/indra/llui/llurlmatch.cpp +++ b/indra/llui/llurlmatch.cpp @@ -58,7 +58,7 @@ void LLUrlMatch::setValues(U32 start, U32 end, const std::string &url, const std mTooltip = tooltip; mIcon = icon; mStyle = style; - mStyle->setLinkHREF(url); + mStyle->setLinkHREF(mStyle->isLink() ? LLStringUtil::null : url); // Singu Note: This hack exists in lieu of no link flag mMenuName = menu; mLocation = location; mID = id;