DEV-44732 avoidable false-positives on automatic URL finding in chat

meow-7.2.2
Tofu Linden 2010-01-04 15:11:23 -08:00
parent f3ba1f4442
commit e8659e0e13
1 changed files with 5 additions and 2 deletions

View File

@ -201,8 +201,11 @@ std::string LLUrlEntryHTTPLabel::getUrl(const std::string &string)
//
LLUrlEntryHTTPNoProtocol::LLUrlEntryHTTPNoProtocol()
{
mPattern = boost::regex("(\\bwww\\.\\S+\\.\\S+|\\b[^ \t\n\r\f\v:/]+.com\\S*|\\b[^ \t\n\r\f\v:/]+.net\\S*|\\b[^ \t\n\r\f\v:/]+.edu\\S*|\\b[^ \t\n\r\f\v:/]+.org\\S*)",
boost::regex::perl|boost::regex::icase);
mPattern = boost::regex("("
"\\bwww\\.\\S+\\.\\S+" // www.FOO.BAR
"|\\b[^ \t\n\r\f\v:/]+.(?:com|net|edu|org)[^[:space:][:alnum:]]*$" // FOO.net
")",
boost::regex::perl|boost::regex::icase);
mMenuName = "menu_url_http.xml";
mTooltip = LLTrans::getString("TooltipHttpUrl");
}