Bug #97835 --> don't linkify words with @ signs in them unless they have a '.' somewhere after the space.

r=varada
sr=sspitzer
a=asa
This commit is contained in:
mscott%netscape.com 2001-09-01 00:57:07 +00:00
Родитель f23a33b28b
Коммит 72b986d4f0
1 изменённых файлов: 8 добавлений и 2 удалений

Просмотреть файл

@ -151,8 +151,14 @@ mozTXTToHTMLConv::CompleteAbbreviatedURL(const PRUnichar * aInString, PRInt32 aI
{
if (aInString[pos] == '@')
{
aOutString.AssignWithConversion("mailto:");
aOutString += aInString;
// only pre-pend a mailto url if the string contains a .domain in it..
//i.e. we want to linkify johndoe@foo.com but not "let's meet @8pm"
nsDependentString inString(aInString, aInLength);
if (inString.FindChar('.', pos) != kNotFound) // if we have a '.' after the @ sign....
{
aOutString.AssignWithConversion("mailto:");
aOutString += aInString;
}
}
else if (aInString[pos] == '.')
{