From 0934759a779fa055927e05fe7ac588b546dd2e97 Mon Sep 17 00:00:00 2001 From: M66B Date: Mon, 20 May 2024 07:36:29 +0200 Subject: [PATCH] Workaround invalid tracking image width/height --- app/src/main/java/eu/faircode/email/HtmlHelper.java | 7 +++++-- 1 file changed, 5 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 617b7a09bb..9daf7a62ab 100644 --- a/app/src/main/java/eu/faircode/email/HtmlHelper.java +++ b/app/src/main/java/eu/faircode/email/HtmlHelper.java @@ -2425,8 +2425,11 @@ public class HtmlHelper { if ("cloudmagic-smart-beacon".equals(img.className())) return true; - String width = img.attr("width").trim(); - String height = img.attr("height").trim(); + // Canary Mail + // + + String width = img.attr("width").replace("px", "").trim(); + String height = img.attr("height").replace("px", "").trim(); if (TextUtils.isEmpty(width) || TextUtils.isEmpty(height)) return false;