Skip to content

Commit

Permalink
ios sdk :a fix on url encode at FBRequest.m
Browse files Browse the repository at this point in the history
  • Loading branch information
Yujuan Bao committed Aug 19, 2010
1 parent 1c7a09d commit c0ef5f4
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/FBRequest.m
Expand Up @@ -74,8 +74,14 @@ - (NSString*)generateGetURL {
}
continue;
}
NSString* value = [[_params objectForKey:key]
stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];

NSString* value = (NSString *)CFURLCreateStringByAddingPercentEscapes(
NULL, /* allocator */
(CFStringRef)[_params objectForKey:key],
NULL, /* charactersToLeaveUnescaped */
(CFStringRef)@"!*'();:@&=+$,/?%#[]",
kCFStringEncodingUTF8);

[pairs addObject:[NSString stringWithFormat:@"%@=%@", key, value]];
}
NSString* params = [pairs componentsJoinedByString:@"&"];
Expand Down

0 comments on commit c0ef5f4

Please sign in to comment.