diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2024-04-16 15:25:25 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2024-04-16 15:25:25 -0400 |
commit | 78d985c154b0d71064b89891f5b2005e48c300ce (patch) | |
tree | c43bc6be58ec9b30f0f4dfaa6c027736fb331582 /indra/llui/llurlentry.cpp | |
parent | 6c2a278c3dbd9d0660be5e9f6ec1c756af7cb992 (diff) | |
parent | a3cbd41543258818589dd0e368c68d2dc62b3398 (diff) |
Merge branch 'main' into release/luau-scripting
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 |