mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-25 02:13:45 +02:00
Improved keyword sanitizer
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user