Merge fix #5: Fix the BUG-8331 fail - removing protocol from the URL will make SLURL barf
parent
aeab57963f
commit
6708f8d110
|
|
@ -371,6 +371,9 @@ LLUrlEntrySeconlifeURL::LLUrlEntrySeconlifeURL()
|
|||
|
||||
mIcon = "Hand";
|
||||
mMenuName = "menu_url_http.xml";
|
||||
|
||||
// <FS:Ansariel> We show the full URL in the text - show normal tool tip
|
||||
mTooltip = LLTrans::getString("TooltipHttpUrl");
|
||||
}
|
||||
|
||||
std::string LLUrlEntrySeconlifeURL::getLabel(const std::string &url, const LLUrlLabelCallback &cb)
|
||||
|
|
@ -385,9 +388,23 @@ std::string LLUrlEntrySeconlifeURL::getLabel(const std::string &url, const LLUrl
|
|||
|
||||
std::string LLUrlEntrySeconlifeURL::getTooltip(const std::string &url) const
|
||||
{
|
||||
return url;
|
||||
// <FS:Ansariel> We show the full URL in the text - show normal tool tip
|
||||
//return url;
|
||||
return mTooltip;
|
||||
// </FS:Ansariel>
|
||||
}
|
||||
|
||||
// <FS:Ansariel> BUG-8331: Clicking on trusted URLs open places panel
|
||||
std::string LLUrlEntrySeconlifeURL::getUrl(const std::string &string) const
|
||||
{
|
||||
if (string.find("://") == std::string::npos)
|
||||
{
|
||||
return "http://" + escapeUrl(string);
|
||||
}
|
||||
return escapeUrl(string);
|
||||
}
|
||||
// </FS:Ansariel>
|
||||
|
||||
//
|
||||
// LLUrlEntryAgent Describes a Second Life agent Url, e.g.,
|
||||
// secondlife:///app/agent/0e346d8b-4433-4d66-a6b0-fd37083abc4c/about
|
||||
|
|
|
|||
|
|
@ -179,6 +179,8 @@ public:
|
|||
bool isTrusted() const { return true; }
|
||||
/*virtual*/ std::string getLabel(const std::string &url, const LLUrlLabelCallback &cb);
|
||||
/*virtual*/ std::string getTooltip(const std::string &url) const;
|
||||
// <FS:Ansariel> BUG-8331: Clicking on trusted URLs open places panel
|
||||
/*virtual*/ std::string getUrl(const std::string &string) const;
|
||||
|
||||
private:
|
||||
std::string mLabel;
|
||||
|
|
|
|||
Loading…
Reference in New Issue