- (NSString *)URLEncodeString { NSCharacterSet *set = [NSCharacterSet URLQueryAllowedCharacterSet]; NSString *encodedString = [self stringByAddingPercentEncodingWithAllowedCharacters:set]; return encodedString; }