Skip to content
This repository was archived by the owner on Jan 12, 2024. It is now read-only.

Commit aea8109

Browse files
committed
trim address and userid string
1 parent c139c3d commit aea8109

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

V2RayX/ServerProfile.m

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ - (NSString*)description {
3030
}
3131

3232
- (NSDictionary*)dictionaryForm {
33-
return @{@"address": address != nil ? address : @"",
33+
return @{@"address": address != nil ? [address stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]] : @"",
3434
@"port": port != nil ? port : @0,
35-
@"userId": userId != nil ? userId : @"",
35+
@"userId": userId != nil ? [userId stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]]: @"",
3636
@"alterId": alterId != nil ? alterId : @0,
3737
@"remark": remark != nil ? remark : @"",
3838
@"allowPassive": allowPassive != nil ? allowPassive : [NSNumber numberWithBool:false],

0 commit comments

Comments
 (0)