- (NSString*)encodeValue:(NSString*)value
{
NSString* encodedValue = value;
if (value.length > 0) {
encodedValue = (__bridge_transfer NSString*)CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault, (__bridge CFStringRef)value, NULL, (__bridge CFStringRef)@"!*'();:@&=+$,/?%#[]", kCFStringEncodingUTF8 );
}
return encodedValue;
}
网友评论