1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2025-02-26 07:53:12 +00:00

Small improvement

This commit is contained in:
M66B 2020-02-02 11:11:44 +01:00
parent 49e50c7d33
commit 0481ba0cfc

View file

@ -331,7 +331,9 @@ public class HtmlHelper {
if (kv.length == 2) {
String key = kv[0].trim().toLowerCase(Locale.ROOT);
String value = kv[1].toLowerCase(Locale.ROOT)
.replaceAll("\\s", "");
.trim()
.replace("!important", "")
.replaceAll("\\s+", " ");
switch (key) {
case "color":
Integer color = parseColor(value, dark);
@ -637,8 +639,7 @@ public class HtmlHelper {
.replace("initial", "")
.replace("windowtext", "")
.replace("transparent", "")
.replace("!important", "")
.replaceAll("[^a-z0-9(),.%]", "");
.replaceAll("[^a-z0-9(),.%#]", "");
Integer color = null;
try {