From 4a187aec4ef05ef8c78fc23e0cf95a87566c8998 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Fri, 16 Oct 2015 11:28:53 +0200 Subject: MAINT-5756: Unicode characters in online notifications get stripped --- doc/contributions.txt | 1 + indra/llui/llurlregistry.cpp | 5 +++-- indra/llui/llurlregistry.h | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/doc/contributions.txt b/doc/contributions.txt index 4d4b330749..33547a78a1 100755 --- a/doc/contributions.txt +++ b/doc/contributions.txt @@ -186,6 +186,7 @@ Ansariel Hiller STORM-1984 STORM-1979 MAINT-5533 + MAINT-5756 Aralara Rajal Arare Chantilly CHUIBUG-191 diff --git a/indra/llui/llurlregistry.cpp b/indra/llui/llurlregistry.cpp index 69eefa736c..4f389a0c12 100755 --- a/indra/llui/llurlregistry.cpp +++ b/indra/llui/llurlregistry.cpp @@ -41,7 +41,8 @@ LLUrlRegistry::LLUrlRegistry() mUrlEntry.reserve(20); // Urls are matched in the order that they were registered - registerUrl(new LLUrlEntryNoLink()); + mUrlEntryNoLink = new LLUrlEntryNoLink(); + registerUrl(mUrlEntryNoLink); mUrlEntryIcon = new LLUrlEntryIcon(); registerUrl(mUrlEntryIcon); mLLUrlEntryInvalidSLURL = new LLUrlEntryInvalidSLURL(); @@ -223,7 +224,7 @@ bool LLUrlRegistry::findUrl(const std::string &text, LLUrlMatch &match, const LL std::string url = text.substr(match_start, match_end - match_start + 1); LLUrlEntryBase *stripped_entry = NULL; - if(LLStringUtil::containsNonprintable(url)) + if(match_entry != mUrlEntryNoLink && LLStringUtil::containsNonprintable(url)) { LLStringUtil::stripNonprintable(url); diff --git a/indra/llui/llurlregistry.h b/indra/llui/llurlregistry.h index 5ce4048d5d..24c3a2b513 100755 --- a/indra/llui/llurlregistry.h +++ b/indra/llui/llurlregistry.h @@ -98,6 +98,7 @@ private: LLUrlEntryBase* mLLUrlEntryInvalidSLURL; LLUrlEntryBase* mUrlEntryHTTPLabel; LLUrlEntryBase* mUrlEntrySLLabel; + LLUrlEntryBase* mUrlEntryNoLink; }; #endif -- cgit v1.2.3