From ae373ac337db95857d484b259a09631f39207816 Mon Sep 17 00:00:00 2001 From: M66B Date: Mon, 14 Mar 2022 07:55:51 +0100 Subject: [PATCH] Yahoo --- app/src/main/java/eu/faircode/email/ContactInfo.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/ContactInfo.java b/app/src/main/java/eu/faircode/email/ContactInfo.java index 54da993d98..5669448c6d 100644 --- a/app/src/main/java/eu/faircode/email/ContactInfo.java +++ b/app/src/main/java/eu/faircode/email/ContactInfo.java @@ -322,10 +322,12 @@ public class ContactInfo { "googlemail.com".equals(d)) d = "support.google.com"; - // https://yahoo.fr redirects unsafely to http://fr.yahoo.com/favicon.ico - String[] dparts = d.split("\\."); - if (dparts.length > 1 && "yahoo".equals(dparts[dparts.length - 2])) - d = "yahoo.com"; + // https://yahoo.fr/co.uk redirects unsafely to http://fr.yahoo.com/favicon.ico + for (String yahoo : d.split("\\.")) + if ("yahoo".equals(yahoo)) { + d = "yahoo.com"; + break; + } final String domain = d.toLowerCase(Locale.ROOT); final String email = info.email.toLowerCase(Locale.ROOT);