mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-01 09:49:27 +00:00
fix(mailer): don't add mailto: to string starting with @
This commit is contained in:
@@ -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: @"<a rel=\"noopener\" href=\"%@%@\">%@</a>",
|
||||
([urlText hasPrefix: prefix]? @"" : prefix),
|
||||
urlText, urlText];
|
||||
|
||||
Reference in New Issue
Block a user