summaryrefslogtreecommitdiff
path: root/indra/llui/llurlentry.cpp
diff options
context:
space:
mode:
authorRoxanne Skelly <roxanne@roxiware.com>2024-05-08 17:41:46 -0700
committerGitHub <noreply@github.com>2024-05-08 17:41:46 -0700
commitbe19e495c5483c06b9b90dd18bf8ebbe7ceaa336 (patch)
tree4d51dd366e2e2ce69610a06e7ab767824ab8869c /indra/llui/llurlentry.cpp
parent818c8c6deaa755c02b64fb03766ee03d66021968 (diff)
parent70af754dc09e29a492828e7cc4ed5db8d32eda3d (diff)
Merge pull request #1440 from secondlife/roxie/webrtc-voice
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