diff options
author | dolphin <dolphin@lindenlab.com> | 2014-06-17 13:09:15 -0700 |
---|---|---|
committer | dolphin <dolphin@lindenlab.com> | 2014-06-17 13:09:15 -0700 |
commit | 299921de323eb9b6844cd7b6f6b8da3490ee3747 (patch) | |
tree | dcb4c5c257622c20014a0b986dc8e2d1c25a10c7 /indra/llui/llurlregistry.cpp | |
parent | 89ea1cbc7acee8878c36a5795dd3df12a913c513 (diff) | |
parent | 977476171ddcc057d7c28b6c14ae988b8189ed75 (diff) |
Merge with 3.7.9-release
Diffstat (limited to 'indra/llui/llurlregistry.cpp')
-rwxr-xr-x | indra/llui/llurlregistry.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/indra/llui/llurlregistry.cpp b/indra/llui/llurlregistry.cpp index 480f05bd72..4590f0ec28 100755 --- a/indra/llui/llurlregistry.cpp +++ b/indra/llui/llurlregistry.cpp @@ -41,7 +41,8 @@ LLUrlRegistry::LLUrlRegistry() // Urls are matched in the order that they were registered registerUrl(new LLUrlEntryNoLink()); - registerUrl(new LLUrlEntryIcon()); + mUrlEntryIcon = new LLUrlEntryIcon(); + registerUrl(mUrlEntryIcon); registerUrl(new LLUrlEntrySLURL()); registerUrl(new LLUrlEntryHTTP()); registerUrl(new LLUrlEntryHTTPLabel()); @@ -146,7 +147,7 @@ static bool stringHasUrl(const std::string &text) text.find("<icon") != std::string::npos); } -bool LLUrlRegistry::findUrl(const std::string &text, LLUrlMatch &match, const LLUrlLabelCallback &cb) +bool LLUrlRegistry::findUrl(const std::string &text, LLUrlMatch &match, const LLUrlLabelCallback &cb, bool is_content_trusted) { // avoid costly regexes if there is clearly no URL in the text if (! stringHasUrl(text)) @@ -161,6 +162,12 @@ bool LLUrlRegistry::findUrl(const std::string &text, LLUrlMatch &match, const LL std::vector<LLUrlEntryBase *>::iterator it; for (it = mUrlEntry.begin(); it != mUrlEntry.end(); ++it) { + //Skip for url entry icon if content is not trusted + if(!is_content_trusted && (mUrlEntryIcon == *it)) + { + continue; + } + LLUrlEntryBase *url_entry = *it; U32 start = 0, end = 0; |