diff options
author | andreykproductengine <akleshchev@productengine.com> | 2015-04-29 15:28:21 +0300 |
---|---|---|
committer | andreykproductengine <akleshchev@productengine.com> | 2015-04-29 15:28:21 +0300 |
commit | 5f397bdd1831b1be593982ca8fc88dbe1a0cad07 (patch) | |
tree | 1d0b8a8973a30bf3c65f09da653b0e7c009053fd /indra/llui/llurlregistry.cpp | |
parent | 1382e9bae647d6b548cd9a1fc78339e5929ea202 (diff) | |
parent | fde0868231a25b8c9ce03a86cb53f1738d35688d (diff) |
Merge from viewer-release
Diffstat (limited to 'indra/llui/llurlregistry.cpp')
-rwxr-xr-x | indra/llui/llurlregistry.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/indra/llui/llurlregistry.cpp b/indra/llui/llurlregistry.cpp index 88d2c4639d..1143574968 100755 --- a/indra/llui/llurlregistry.cpp +++ b/indra/llui/llurlregistry.cpp @@ -191,7 +191,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))) { @@ -220,9 +220,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), @@ -255,7 +258,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; |