Browse Source

IOS-2935 Remove trailing back slashes from addresses

IOS-2935
Dirk Zimmermann 4 months ago
parent
commit
f306be7854
1 changed files with 7 additions and 2 deletions
  1. +7
    -2
      pantomime-lib/Framework/Pantomime/CWInternetAddress.m

+ 7
- 2
pantomime-lib/Framework/Pantomime/CWInternetAddress.m View File

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


Loading…
Cancel
Save