From 1fc0ec5db7a05bdaee83e7c97c6f843a9098cb4f Mon Sep 17 00:00:00 2001 From: M66B Date: Tue, 24 Sep 2019 13:31:27 +0200 Subject: [PATCH] Allow color style on all html tags --- app/src/main/java/eu/faircode/email/HtmlHelper.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/HtmlHelper.java b/app/src/main/java/eu/faircode/email/HtmlHelper.java index 55388c963d..45db534b65 100644 --- a/app/src/main/java/eu/faircode/email/HtmlHelper.java +++ b/app/src/main/java/eu/faircode/email/HtmlHelper.java @@ -141,12 +141,12 @@ public class HtmlHelper { .addProtocols("img", "src", "cid") .addProtocols("img", "src", "data"); if (text_color) - whitelist.addAttributes("span", "style"); + whitelist.addAttributes(":all", "style"); final Document document = new Cleaner(whitelist).clean(parsed); // Sanitize span styles - for (Element span : document.select("span")) { + for (Element span : document.select("*")) { String style = span.attr("style"); if (!TextUtils.isEmpty(style)) { StringBuilder sb = new StringBuilder();