From 3d7dedff268cdedbea586c3e329c0682ee841290 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Fri, 24 Nov 2017 17:58:02 +0200 Subject: MAINT-8023 Viewer breaks URLs with internationalized domain names --- indra/llui/llurlentry.cpp | 11 ++++++----- indra/llui/llurlregistry.cpp | 35 +++-------------------------------- 2 files changed, 9 insertions(+), 37 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp index a4243ebfa1..a4dc5bcde1 100644 --- a/indra/llui/llurlentry.cpp +++ b/indra/llui/llurlentry.cpp @@ -190,31 +190,32 @@ bool LLUrlEntryBase::isWikiLinkCorrect(std::string url) std::string LLUrlEntryBase::urlToLabelWithGreyQuery(const std::string &url) const { - LLUriParser up(unescapeUrl(url)); + LLUriParser up(escapeUrl(url)); up.normalize(); std::string label; up.extractParts(); up.glueFirst(label); - return label; + return unescapeUrl(label); } std::string LLUrlEntryBase::urlToGreyQuery(const std::string &url) const { - LLUriParser up(unescapeUrl(url)); + std::string escaped_url = escapeUrl(url); + LLUriParser up(escaped_url); std::string label; up.extractParts(); up.glueFirst(label, false); - size_t pos = url.find(label); + size_t pos = escaped_url.find(label); if (pos == std::string::npos) { return ""; } pos += label.size(); - return url.substr(pos); + return unescapeUrl(escaped_url.substr(pos)); } diff --git a/indra/llui/llurlregistry.cpp b/indra/llui/llurlregistry.cpp index fa6593267a..ba6fa1e2e9 100644 --- a/indra/llui/llurlregistry.cpp +++ b/indra/llui/llurlregistry.cpp @@ -212,7 +212,7 @@ bool LLUrlRegistry::findUrl(const std::string &text, LLUrlMatch &match, const LL } } } - + // did we find a match? if so, return its details in the match object if (match_entry) { @@ -223,33 +223,6 @@ bool LLUrlRegistry::findUrl(const std::string &text, LLUrlMatch &match, const LL // fill in the LLUrlMatch object and return it std::string url = text.substr(match_start, match_end - match_start + 1); - LLUrlEntryBase *stripped_entry = NULL; - if((match_entry != mUrlEntryNoLink) && (match_entry != mUrlEntryHTTPLabel) && (match_entry !=mUrlEntrySLLabel) - && LLStringUtil::containsNonprintable(url)) - { - LLStringUtil::stripNonprintable(url); - - std::vector::iterator iter; - for (iter = mUrlEntry.begin(); iter != mUrlEntry.end(); ++iter) - { - LLUrlEntryBase *url_entry = *iter; - U32 start = 0, end = 0; - if (matchRegex(url.c_str(), url_entry->getPattern(), start, end)) - { - if (mLLUrlEntryInvalidSLURL == *iter) - { - if(url_entry && url_entry->isSLURLvalid(url)) - { - continue; - } - } - stripped_entry = url_entry; - break; - } - } - } - - if (match_entry == mUrlEntryTrusted) { LLUriParser up(url); @@ -257,12 +230,10 @@ bool LLUrlRegistry::findUrl(const std::string &text, LLUrlMatch &match, const LL url = up.normalizedUri(); } - std::string url_label = stripped_entry? stripped_entry->getLabel(url, cb) : match_entry->getLabel(url, cb); - std::string url_query = stripped_entry? stripped_entry->getQuery(url) : match_entry->getQuery(url); match.setValues(match_start, match_end, match_entry->getUrl(url), - url_label, - url_query, + match_entry->getLabel(url, cb), + match_entry->getQuery(url), match_entry->getTooltip(url), match_entry->getIcon(url), match_entry->getStyle(), -- cgit v1.2.3 From 7de6475a0a61dcd79bd8b11519c01efba953293d Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Wed, 3 Jan 2018 18:45:02 +0200 Subject: MAINT-8125 "New" tag remains visible when searching items in Received Items panel --- indra/llui/llbadge.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llui') diff --git a/indra/llui/llbadge.cpp b/indra/llui/llbadge.cpp index 42726de0ad..15b6899d74 100644 --- a/indra/llui/llbadge.cpp +++ b/indra/llui/llbadge.cpp @@ -224,7 +224,7 @@ void LLBadge::draw() { LLView* owner_view = mOwner.get(); - if (owner_view) + if (owner_view && owner_view->isInVisibleChain()) { // // Calculate badge size based on label text -- cgit v1.2.3 From f82548b931af69a08d53818ec7a96a967c05151c Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Sat, 31 Mar 2018 10:59:39 -0400 Subject: MAINT-8474: Xcode 9.3 insists that comparators use const operator(). --- indra/llui/llnotifications.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llui') diff --git a/indra/llui/llnotifications.h b/indra/llui/llnotifications.h index ccdfb90054..1509446920 100644 --- a/indra/llui/llnotifications.h +++ b/indra/llui/llnotifications.h @@ -703,7 +703,7 @@ namespace LLNotificationComparators { struct orderByUUID { - bool operator()(LLNotificationPtr lhs, LLNotificationPtr rhs) + bool operator()(LLNotificationPtr lhs, LLNotificationPtr rhs) const { return lhs->id() < rhs->id(); } -- cgit v1.2.3