зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
f23a33b28b
Коммит
72b986d4f0
|
@ -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] == '.')
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче