Browse Source

Merge branch 'IOS-2935'

master
Dirk Zimmermann 3 months ago
parent
commit
00aeff8c23
2 changed files with 21 additions and 4 deletions
  1. +16
    -1
      pantomime-lib/Framework/Pantomime/CWInternetAddress.m
  2. +5
    -3
      pantomime-lib/Framework/Pantomime/CWParser.m

+ 16
- 1
pantomime-lib/Framework/Pantomime/CWInternetAddress.m View File

@ -131,7 +131,22 @@
[self setAddress: theString];
}
return self;
// Remove trailing back slashes.
NSString *addressString = [self.address stringFromQuotedString];
while ([addressString hasSuffix:@"\\"]) {
NSUInteger lastIndex = addressString.length - 1;
if (lastIndex > 0) {
lastIndex -= 1;
}
addressString = [addressString substringToIndex:lastIndex];
}
if (addressString.length == 0) {
return nil;
} else {
self.address = addressString;
return self;
}
}
//


+ 5
- 3
pantomime-lib/Framework/Pantomime/CWParser.m View File

@ -621,9 +621,11 @@ NSRange shrinkRange(NSRange range)
initWithString: [CWMIMEUtility decodeHeader: [[aData subdataWithRange: NSMakeRange(x, s_len)] dataByTrimmingWhiteSpaces]
charset: [theMessage defaultCharset]]];
[anInternetAddress setType: theType];
[theMessage addRecipient: anInternetAddress];
RELEASE(anInternetAddress);
if (anInternetAddress) { // ignore malformed addresses
[anInternetAddress setType: theType];
[theMessage addRecipient: anInternetAddress];
RELEASE(anInternetAddress);
}
x = y+1;
}


Loading…
Cancel
Save