diff --git a/app/src/main/java/eu/faircode/email/HtmlHelper.java b/app/src/main/java/eu/faircode/email/HtmlHelper.java index 93d28b1d75..9994e0bcdd 100644 --- a/app/src/main/java/eu/faircode/email/HtmlHelper.java +++ b/app/src/main/java/eu/faircode/email/HtmlHelper.java @@ -1101,9 +1101,12 @@ public class HtmlHelper { boolean linked = false; Element p = img.parent(); while (p != null && !linked) - if ("a".equals(p.tagName())) + if ("a".equals(p.tagName())) { + String href = p.attr("href"); + if (TextUtils.isEmpty(href) || href.equals("#")) + break; linked = true; - else + } else p = p.parent(); if (linked) alt = context.getString(R.string.title_image_link);