From b0dcfa036501786db883e8e070c3f6ba42d210bc Mon Sep 17 00:00:00 2001 From: M66B Date: Sun, 1 Jan 2023 19:37:52 +0100 Subject: [PATCH] Prevent pasting invisible text --- app/src/main/java/eu/faircode/email/HtmlHelper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/eu/faircode/email/HtmlHelper.java b/app/src/main/java/eu/faircode/email/HtmlHelper.java index 26c1833991..5459eb8c0a 100644 --- a/app/src/main/java/eu/faircode/email/HtmlHelper.java +++ b/app/src/main/java/eu/faircode/email/HtmlHelper.java @@ -763,7 +763,7 @@ public class HtmlHelper { // Special case: // external draft: very dark/light font double lum = ColorUtils.calculateLuminance(color); - if (dark ? lum < 1 - MIN_LUMINANCE_COMPOSE : lum > MIN_LUMINANCE_COMPOSE) + if (lum < 1 - MIN_LUMINANCE_COMPOSE || lum > MIN_LUMINANCE_COMPOSE) color = null; }