mirror of https://github.com/M66B/FairEmail.git
Improved keyword sanitizer
This commit is contained in:
parent
0f14ee0fd2
commit
6646fb4567
|
@ -54,6 +54,7 @@ import java.net.IDN;
|
|||
import java.nio.charset.Charset;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.text.Normalizer;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
|
@ -2063,7 +2064,9 @@ public class MessageHelper {
|
|||
continue;
|
||||
sb.append(kar);
|
||||
}
|
||||
return sb.toString();
|
||||
|
||||
return Normalizer.normalize(sb.toString(), Normalizer.Form.NFKD)
|
||||
.replaceAll("[^\\p{ASCII}]", "");
|
||||
}
|
||||
|
||||
static String sanitizeEmail(String email) {
|
||||
|
|
Loading…
Reference in New Issue