From 981748754a4857bab66a6fb94cdc5da4265ce003 Mon Sep 17 00:00:00 2001 From: Hivert Quentin Date: Wed, 24 Sep 2025 09:18:08 +0200 Subject: [PATCH] fix(mailer): don't add mailto: to string starting with @ --- SoObjects/SOGo/NSString+Utilities.m | 3 +++ 1 file changed, 3 insertions(+) diff --git a/SoObjects/SOGo/NSString+Utilities.m b/SoObjects/SOGo/NSString+Utilities.m index ac1d36a47..45480cf32 100644 --- a/SoObjects/SOGo/NSString+Utilities.m +++ b/SoObjects/SOGo/NSString+Utilities.m @@ -184,6 +184,9 @@ static int cssEscapingCount; { rangePtr->location += offset; urlText = [selfCopy substringFromRange: *rangePtr]; + //If we try to detect mail, check if the first char is @, meaning this is not an email + if([prefix isEqualToString: @"mailto:"] && [urlText characterAtIndex: 0] == '@') + continue; newUrlText = [NSString stringWithFormat: @"%@", ([urlText hasPrefix: prefix]? @"" : prefix), urlText, urlText];