summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
authormaxim_productengine <mnikolenko@productengine.com>2018-04-19 16:48:46 +0300
committermaxim_productengine <mnikolenko@productengine.com>2018-04-19 16:48:46 +0300
commit057bcc92eced27ad9d0d926357aabf9252309773 (patch)
treec5a98f6a38fce6fbb39bcfd454960788df4b1996 /indra/llui
parent1fc32d4c973275cf86d2b936e7bb3241e0155197 (diff)
MAINT-8552 FIXED Secure map links do not parse in chat and SL icon is not displayed
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/llurlentry.cpp5
-rw-r--r--indra/llui/llurlentry.h1
2 files changed, 4 insertions, 2 deletions
diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp
index a4dc5bcde1..cd9b52d164 100644
--- a/indra/llui/llurlentry.cpp
+++ b/indra/llui/llurlentry.cpp
@@ -298,7 +298,7 @@ std::string LLUrlEntryHTTPLabel::getUrl(const std::string &string) const
LLUrlEntryInvalidSLURL::LLUrlEntryInvalidSLURL()
: LLUrlEntryBase()
{
- mPattern = boost::regex("(http://(maps.secondlife.com|slurl.com)/secondlife/|secondlife://(/app/(worldmap|teleport)/)?)[^ /]+(/-?[0-9]+){1,3}(/?(\\?title|\\?img|\\?msg)=\\S*)?/?",
+ mPattern = boost::regex("(https?://(maps.secondlife.com|slurl.com)/secondlife/|secondlife://(/app/(worldmap|teleport)/)?)[^ /]+(/-?[0-9]+){1,3}(/?(\\?title|\\?img|\\?msg)=\\S*)?/?",
boost::regex::perl|boost::regex::icase);
mMenuName = "menu_url_http.xml";
mTooltip = LLTrans::getString("TooltipHttpUrl");
@@ -385,8 +385,9 @@ bool LLUrlEntryInvalidSLURL::isSLURLvalid(const std::string &url) const
LLUrlEntrySLURL::LLUrlEntrySLURL()
{
// see http://slurl.com/about.php for details on the SLURL format
- mPattern = boost::regex("http://(maps.secondlife.com|slurl.com)/secondlife/[^ /]+(/\\d+){0,3}(/?(\\?title|\\?img|\\?msg)=\\S*)?/?",
+ mPattern = boost::regex("https?://(maps.secondlife.com|slurl.com)/secondlife/[^ /]+(/\\d+){0,3}(/?(\\?title|\\?img|\\?msg)=\\S*)?/?",
boost::regex::perl|boost::regex::icase);
+ mIcon = "Hand";
mMenuName = "menu_url_slurl.xml";
mTooltip = LLTrans::getString("TooltipSLURL");
}
diff --git a/indra/llui/llurlentry.h b/indra/llui/llurlentry.h
index 28e9931718..78c149d9fd 100644
--- a/indra/llui/llurlentry.h
+++ b/indra/llui/llurlentry.h
@@ -175,6 +175,7 @@ class LLUrlEntrySLURL : public LLUrlEntryBase
{
public:
LLUrlEntrySLURL();
+ /*virtual*/ bool isTrusted() const { return true; }
/*virtual*/ std::string getLabel(const std::string &url, const LLUrlLabelCallback &cb);
/*virtual*/ std::string getLocation(const std::string &url) const;
};