From 2b8827a55f6a935bac8abb7513be1c00659f6ab1 Mon Sep 17 00:00:00 2001 From: maksymsproductengine Date: Mon, 13 Oct 2014 19:14:42 +0300 Subject: MAINT-4169 FIXED Suppress initial display of the path portion of URLs from other users and scripts --- indra/llui/llurlregistry.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'indra/llui/llurlregistry.cpp') diff --git a/indra/llui/llurlregistry.cpp b/indra/llui/llurlregistry.cpp index 9e8d8d01f1..280d066087 100755 --- a/indra/llui/llurlregistry.cpp +++ b/indra/llui/llurlregistry.cpp @@ -47,7 +47,8 @@ LLUrlRegistry::LLUrlRegistry() registerUrl(new LLUrlEntrySLURL()); // decorated links for host names like: secondlife.com and lindenlab.com - registerUrl(new LLUrlEntrySeconlifeURL()); + registerUrl(new LLUrlEntrySecondlifeURL()); + registerUrl(new LLUrlEntrySimpleSecondlifeURL()); registerUrl(new LLUrlEntryHTTP()); mUrlEntryHTTPLabel = new LLUrlEntryHTTPLabel(); @@ -199,6 +200,7 @@ bool LLUrlRegistry::findUrl(const std::string &text, LLUrlMatch &match, const LL match_start = start; match_end = end; match_entry = url_entry; + break; } } } @@ -216,6 +218,7 @@ bool LLUrlRegistry::findUrl(const std::string &text, LLUrlMatch &match, const LL match.setValues(match_start, match_end, match_entry->getUrl(url), match_entry->getLabel(url, cb), + match_entry->getQuery(url), match_entry->getTooltip(url), match_entry->getIcon(url), match_entry->getStyle(), @@ -252,6 +255,7 @@ bool LLUrlRegistry::findUrl(const LLWString &text, LLUrlMatch &match, const LLUr match.setValues(start, end, match.getUrl(), match.getLabel(), + match.getQuery(), match.getTooltip(), match.getIcon(), match.getStyle(), -- cgit v1.2.3 From 5c3d8de4a5294e9bec65678b089a8eebb4105427 Mon Sep 17 00:00:00 2001 From: MNikolenko ProductEngine Date: Wed, 22 Oct 2014 19:37:15 +0300 Subject: MAINT-4602 FIXED URLs are not highlighted as URLs in chat view when preceding an internal URL --- indra/llui/llurlregistry.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/llui/llurlregistry.cpp') diff --git a/indra/llui/llurlregistry.cpp b/indra/llui/llurlregistry.cpp index 280d066087..5918d97be4 100755 --- a/indra/llui/llurlregistry.cpp +++ b/indra/llui/llurlregistry.cpp @@ -200,7 +200,6 @@ bool LLUrlRegistry::findUrl(const std::string &text, LLUrlMatch &match, const LL match_start = start; match_end = end; match_entry = url_entry; - break; } } } -- cgit v1.2.3 From 28e8b8ecdbf7a5aecf9e0dec2e673e832baf642f Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Thu, 4 Dec 2014 12:40:13 +0200 Subject: MAINT-4683 FIXED Display SLURLs with incorrect coordinates as regular URLs. --- indra/llui/llurlregistry.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'indra/llui/llurlregistry.cpp') diff --git a/indra/llui/llurlregistry.cpp b/indra/llui/llurlregistry.cpp index 5918d97be4..88d2c4639d 100755 --- a/indra/llui/llurlregistry.cpp +++ b/indra/llui/llurlregistry.cpp @@ -44,6 +44,8 @@ LLUrlRegistry::LLUrlRegistry() registerUrl(new LLUrlEntryNoLink()); mUrlEntryIcon = new LLUrlEntryIcon(); registerUrl(mUrlEntryIcon); + mLLUrlEntryInvalidSLURL = new LLUrlEntryInvalidSLURL(); + registerUrl(mLLUrlEntryInvalidSLURL); registerUrl(new LLUrlEntrySLURL()); // decorated links for host names like: secondlife.com and lindenlab.com @@ -189,6 +191,14 @@ bool LLUrlRegistry::findUrl(const std::string &text, LLUrlMatch &match, const LL if (start < match_start || match_entry == NULL) { + if((mLLUrlEntryInvalidSLURL == *it)) + { + if(url_entry && url_entry->isSLURLvalid(text.substr(start, end - start + 1))) + { + continue; + } + } + if((mUrlEntryHTTPLabel == *it) || (mUrlEntrySLLabel == *it)) { if(url_entry && !url_entry->isWikiLinkCorrect(text.substr(start, end - start + 1))) -- cgit v1.2.3 From 5a282abe184323643f1a88f2aba662648059b4e2 Mon Sep 17 00:00:00 2001 From: Cinder Date: Sat, 11 Apr 2015 15:23:06 -0600 Subject: STORM-2113 - uri parsing cleanup and fixes --- indra/llui/llurlregistry.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'indra/llui/llurlregistry.cpp') diff --git a/indra/llui/llurlregistry.cpp b/indra/llui/llurlregistry.cpp index 9e8d8d01f1..0f42a1a80c 100755 --- a/indra/llui/llurlregistry.cpp +++ b/indra/llui/llurlregistry.cpp @@ -47,7 +47,7 @@ LLUrlRegistry::LLUrlRegistry() registerUrl(new LLUrlEntrySLURL()); // decorated links for host names like: secondlife.com and lindenlab.com - registerUrl(new LLUrlEntrySeconlifeURL()); + registerUrl(new LLUrlEntrySecondlifeURL()); registerUrl(new LLUrlEntryHTTP()); mUrlEntryHTTPLabel = new LLUrlEntryHTTPLabel(); @@ -209,9 +209,12 @@ 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); - LLUriParser up(url); - up.normalize(); - url = up.normalizedUri(); + if (match_entry == mUrlEntryTrusted) + { + LLUriParser up(url); + up.normalize(); + url = up.normalizedUri(); + } match.setValues(match_start, match_end, match_entry->getUrl(url), @@ -243,7 +246,7 @@ bool LLUrlRegistry::findUrl(const LLWString &text, LLUrlMatch &match, const LLUr // character encoding, so we need to update the start // and end values to be correct for the wide string. LLWString wurl = utf8str_to_wstring(match.getUrl()); - S32 start = text.find(wurl); + size_t start = text.find(wurl); if (start == std::string::npos) { return false; -- cgit v1.2.3 From bef5a95cafdf6e20a243f4091b4fbcf426fb529b Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Tue, 14 Apr 2015 05:00:58 -0400 Subject: minimal changes to compile on Xcode 6.2 --- indra/llui/llurlregistry.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llui/llurlregistry.cpp') diff --git a/indra/llui/llurlregistry.cpp b/indra/llui/llurlregistry.cpp index 88d2c4639d..4fc79964e2 100755 --- a/indra/llui/llurlregistry.cpp +++ b/indra/llui/llurlregistry.cpp @@ -191,7 +191,7 @@ bool LLUrlRegistry::findUrl(const std::string &text, LLUrlMatch &match, const LL if (start < match_start || match_entry == NULL) { - if((mLLUrlEntryInvalidSLURL == *it)) + if (mLLUrlEntryInvalidSLURL == *it) { if(url_entry && url_entry->isSLURLvalid(text.substr(start, end - start + 1))) { -- cgit v1.2.3