加密或者url中文字符或者特殊符号的处理,不是全部,只是对特殊符号的处理。
NSCharacterSet *allowedCharacters = [[NSCharacterSet characterSetWithCharactersInString:@"!#$%&'()*+,/:;=?@[]"] invertedSet];
NSString *encodedUrl = [str1 stringByAddingPercentEncodingWithAllowedCharacters:allowedCharacters];
网友评论