diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/llui/lltexteditor.cpp | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/linden/indra/llui/lltexteditor.cpp b/linden/indra/llui/lltexteditor.cpp index de05872..c8ca5bf 100644 --- a/linden/indra/llui/lltexteditor.cpp +++ b/linden/indra/llui/lltexteditor.cpp | |||
@@ -5119,7 +5119,7 @@ S32 LLTextEditor::findHTMLToken(const std::string &line, S32 pos, BOOL reverse) | |||
5119 | BOOL LLTextEditor::findHTML(const std::string &line, S32 *begin, S32 *end, std::string& url) const | 5119 | BOOL LLTextEditor::findHTML(const std::string &line, S32 *begin, S32 *end, std::string& url) const |
5120 | { | 5120 | { |
5121 | 5121 | ||
5122 | S32 m1,m2,m3; | 5122 | S32 m1,m2,m3,m4; |
5123 | BOOL matched = FALSE; | 5123 | BOOL matched = FALSE; |
5124 | 5124 | ||
5125 | m1=line.find("://",*end); | 5125 | m1=line.find("://",*end); |
@@ -5132,10 +5132,11 @@ BOOL LLTextEditor::findHTML(const std::string &line, S32 *begin, S32 *end, std:: | |||
5132 | //Load_url only handles http and https so don't hilite ftp, smb, etc. | 5132 | //Load_url only handles http and https so don't hilite ftp, smb, etc. |
5133 | m2 = line.substr(*begin,(m1 - *begin)).find("http"); | 5133 | m2 = line.substr(*begin,(m1 - *begin)).find("http"); |
5134 | m3 = line.substr(*begin,(m1 - *begin)).find("secondlife"); | 5134 | m3 = line.substr(*begin,(m1 - *begin)).find("secondlife"); |
5135 | m4 = line.substr(*begin,(m1 - *begin)).find("inworldz"); | ||
5135 | 5136 | ||
5136 | std::string badneighbors=".,<>?';\"][}{=-+_)(*&^%$#@!~`\t\r\n\\"; | 5137 | std::string badneighbors=".,<>?';\"][}{=-+_)(*&^%$#@!~`\t\r\n\\"; |
5137 | 5138 | ||
5138 | if (m2 >= 0 || m3>=0) | 5139 | if (m2 >= 0 || m3>=0 || m4>=0) |
5139 | { | 5140 | { |
5140 | S32 bn = badneighbors.find(line.substr(m1+3,1)); | 5141 | S32 bn = badneighbors.find(line.substr(m1+3,1)); |
5141 | 5142 | ||
@@ -5179,9 +5180,28 @@ BOOL LLTextEditor::findHTML(const std::string &line, S32 *begin, S32 *end, std:: | |||
5179 | try | 5180 | try |
5180 | { | 5181 | { |
5181 | url = line.substr(*begin,*end - *begin); | 5182 | url = line.substr(*begin,*end - *begin); |
5182 | std::string slurlID = "slurl.com/secondlife/"; | ||
5183 | strpos = url.find(slurlID); | ||
5184 | 5183 | ||
5184 | // see if it's an izurl | ||
5185 | std::string slurlID = "places.inworldz.com/"; | ||
5186 | strpos = url.find(slurlID); | ||
5187 | if (strpos < 0) | ||
5188 | { | ||
5189 | slurlID="inworldz://"; | ||
5190 | strpos = url.find(slurlID); | ||
5191 | } | ||
5192 | if (strpos < 0) | ||
5193 | { | ||
5194 | slurlID="iz://"; | ||
5195 | strpos = url.find(slurlID); | ||
5196 | } | ||
5197 | |||
5198 | // see if it's an slurl | ||
5199 | if (strpos < 0) | ||
5200 | { | ||
5201 | slurlID = "slurl.com/secondlife/"; | ||
5202 | strpos = url.find(slurlID); | ||
5203 | } | ||
5204 | |||
5185 | if (strpos < 0) | 5205 | if (strpos < 0) |
5186 | { | 5206 | { |
5187 | slurlID="maps.secondlife.com/secondlife/"; | 5207 | slurlID="maps.secondlife.com/secondlife/"; |