summaryrefslogtreecommitdiff
path: root/indra/llui/llurlregistry.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2015-06-08 16:33:02 -0400
committerOz Linden <oz@lindenlab.com>2015-06-08 16:33:02 -0400
commit949942c730b0b7463338c2cb3bc411ac12f4f648 (patch)
tree159b9cf6bb6a9de9b538f17e3d721be25a15b79a /indra/llui/llurlregistry.cpp
parenta219cf1c98527faa0e7addeb9660f679208bb0e7 (diff)
parentf3c58f765c0168f25bb13c4427e34b4bdad2f671 (diff)
merge changes for 3.7.29-release
Diffstat (limited to 'indra/llui/llurlregistry.cpp')
-rwxr-xr-xindra/llui/llurlregistry.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/indra/llui/llurlregistry.cpp b/indra/llui/llurlregistry.cpp
index a16ae5e4ae..2085505947 100755
--- a/indra/llui/llurlregistry.cpp
+++ b/indra/llui/llurlregistry.cpp
@@ -192,7 +192,7 @@ bool LLUrlRegistry::findUrl(const std::string &text, LLUrlMatch &match, const LL
if (start < match_start || match_entry == NULL)
{
- if((mLLUrlEntryInvalidSLURL == *it))
+ if (mLLUrlEntryInvalidSLURL == *it)
{
if(url_entry && url_entry->isSLURLvalid(text.substr(start, end - start + 1)))
{
@@ -221,9 +221,12 @@ bool LLUrlRegistry::findUrl(const std::string &text, LLUrlMatch &match, const LL
// fill in the LLUrlMatch object and return it
std::string url = text.substr(match_start, match_end - match_start + 1);
- LLUriParser up(url);
- up.normalize();
- url = up.normalizedUri();
+ if (match_entry == mUrlEntryTrusted)
+ {
+ LLUriParser up(url);
+ up.normalize();
+ url = up.normalizedUri();
+ }
match.setValues(match_start, match_end,
match_entry->getUrl(url),
@@ -256,7 +259,7 @@ bool LLUrlRegistry::findUrl(const LLWString &text, LLUrlMatch &match, const LLUr
// character encoding, so we need to update the start
// and end values to be correct for the wide string.
LLWString wurl = utf8str_to_wstring(match.getUrl());
- S32 start = text.find(wurl);
+ size_t start = text.find(wurl);
if (start == std::string::npos)
{
return false;