Remove soft hyphens from names and subjects

This commit is contained in:
M66B 2023-11-29 15:42:29 +01:00
parent b854f606dc
commit 4eba6e0f08
1 changed files with 4 additions and 1 deletions

View File

@ -2616,6 +2616,8 @@ public class MessageHelper {
InternetAddress iaddress = (InternetAddress) address;
String email = iaddress.getAddress();
String personal = iaddress.getPersonal();
if (!TextUtils.isEmpty(personal))
personal = personal.replace("\u00ad", ""); // soft hyphen
if (TextUtils.isEmpty(email) && TextUtils.isEmpty(personal))
continue;
@ -2851,7 +2853,8 @@ public class MessageHelper {
return subject
.trim()
.replace("\n", "")
.replace("\r", "");
.replace("\r", "")
.replace("\u00ad", ""); // soft hyphen
}
Long getSize() throws MessagingException {