summaryrefslogtreecommitdiff
path: root/indra/llui/llurlentry.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2024-04-10 03:55:09 +0300
committerAndrey Lihatskiy <alihatskiy@productengine.com>2024-04-10 03:55:09 +0300
commit8fa956a16e616191e21bf001eabc4670453debcd (patch)
treeaecadf995f0174cc41f7cb9846a1382a930d8f82 /indra/llui/llurlentry.cpp
parent37392be4171303db08a4842b7882b4cb758a8f8d (diff)
parentda9a1dcb55548a249ff7a1255f3e518696b81245 (diff)
Merge branch 'main' into marchcat/b-merge
# Conflicts: # indra/llrender/llgl.cpp # indra/newview/lloutfitslist.cpp
Diffstat (limited to 'indra/llui/llurlentry.cpp')
-rw-r--r--indra/llui/llurlentry.cpp18
1 files changed, 12 insertions, 6 deletions
diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp
index 77e9edf5e5..05d821f5d8 100644
--- a/indra/llui/llurlentry.cpp
+++ b/indra/llui/llurlentry.cpp
@@ -234,14 +234,20 @@ bool LLUrlEntryBase::isWikiLinkCorrect(const std::string &labeled_url) const
std::string LLUrlEntryBase::urlToLabelWithGreyQuery(const std::string &url) const
{
+ if (url.empty())
+ {
+ return url;
+ }
LLUriParser up(escapeUrl(url));
- up.normalize();
-
- std::string label;
- up.extractParts();
- up.glueFirst(label);
+ if (up.normalize() == 0)
+ {
+ std::string label;
+ up.extractParts();
+ up.glueFirst(label);
- return unescapeUrl(label);
+ return unescapeUrl(label);
+ }
+ return std::string();
}
std::string LLUrlEntryBase::urlToGreyQuery(const std::string &url) const