1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-23 08:14:45 +00:00

Sanitize email name

This commit is contained in:
M66B 2018-09-05 07:39:05 +00:00
parent 9983addfdd
commit ebf41cdc76

View file

@ -268,10 +268,13 @@ public class MessageHelper {
String personal = a.getPersonal();
if (TextUtils.isEmpty(personal))
formatted.add(address.toString());
else if (full)
formatted.add(personal + " <" + a.getAddress() + ">");
else
formatted.add(personal);
else {
personal = personal.replaceAll("[\\,\\<\\>]", "");
if (full)
formatted.add(personal + " <" + a.getAddress() + ">");
else
formatted.add(personal);
}
} else
formatted.add(address.toString());
return TextUtils.join(", ", formatted);