diff options
author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2024-04-10 06:57:52 +0300 |
---|---|---|
committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2024-04-10 07:08:25 +0300 |
commit | 84dfe55810815e8c274044cea5c81aaed89a787f (patch) | |
tree | 4e499acfe5617682c5eca52998b5c10cdac8609a /indra/llui/llurlentry.cpp | |
parent | 16e638db975278f6018fe1e21ba1954b7f159149 (diff) | |
parent | da9a1dcb55548a249ff7a1255f3e518696b81245 (diff) |
Merge branch 'main' into marchcat/y-merge
# Conflicts:
# autobuild.xml
# indra/llcommon/llsys.cpp
Diffstat (limited to 'indra/llui/llurlentry.cpp')
-rw-r--r-- | indra/llui/llurlentry.cpp | 18 |
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 |