From 4d6c9e3e1754d21ea5291207085113e99456f571 Mon Sep 17 00:00:00 2001 From: Lynx Linden Date: Fri, 29 Jan 2010 14:30:26 +0000 Subject: EXT-4678: Support ... to turn off URL hyperlinking. We are running into a bunch of places where we don't want to allow hyperlinking of URLs like secondlife.com in text boxes. I've therefore added a new type of URL regex that disables URL hyperlinking. Simply enclose the URL in a tag, e.g.: secondlife.com --- indra/llui/llurlentry.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'indra/llui/llurlentry.h') diff --git a/indra/llui/llurlentry.h b/indra/llui/llurlentry.h index 4adffde99c..94455ac247 100644 --- a/indra/llui/llurlentry.h +++ b/indra/llui/llurlentry.h @@ -91,6 +91,9 @@ public: /// Return the name of a SL location described by this Url, if any virtual std::string getLocation(const std::string &url) const { return ""; } + /// is this a match for a URL that should not be hyperlinked? + bool isLinkDisabled() const { return mDisabledLink; } + protected: std::string getIDStringFromUrl(const std::string &url) const; std::string escapeUrl(const std::string &url) const; @@ -111,6 +114,7 @@ protected: std::string mTooltip; LLUIColor mColor; std::multimap mObservers; + bool mDisabledLink; }; /// @@ -267,4 +271,14 @@ public: /*virtual*/ std::string getLocation(const std::string &url) const; }; +/// +/// LLUrlEntryNoLink lets us turn of URL detection with ... tags +/// +class LLUrlEntryNoLink : public LLUrlEntryBase +{ +public: + LLUrlEntryNoLink(); + /*virtual*/ std::string getLabel(const std::string &url, const LLUrlLabelCallback &cb); +}; + #endif -- cgit v1.2.3