diff options
author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2024-04-12 15:43:34 +0300 |
---|---|---|
committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2024-04-12 15:43:34 +0300 |
commit | eab5beb54cacc2b0dc2cddad4a78634e7468a298 (patch) | |
tree | 51f17910f529af57819bcd77f1a7dd9e92f6291e /indra/llui/llurlentry.cpp | |
parent | 00e09ddcad8ec2c33ecbcdd0da09bd7819bc3509 (diff) | |
parent | cc8fdf341dbbe6ab940d7b24bcf81cbed252cb69 (diff) |
Merge branch 'main' into marchcat/x-merge
# Conflicts:
# indra/llimage/llimageworker.cpp
# indra/llimage/llimageworker.h
# indra/newview/llcontrolavatar.cpp
# indra/newview/llfloaterprofiletexture.cpp
# indra/newview/lloutfitslist.cpp
# indra/newview/lloutfitslist.h
# indra/newview/lltexturefetch.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 |