Permalink
Browse files

better url encoding

  • Loading branch information...
jrwest committed Dec 2, 2011
1 parent fab4e10 commit 66c1c94cf26ec1289a679ea5178dc23d59aae666
Showing with 2 additions and 1 deletion.
  1. +2 −1 StackMob/StackMobAdditions.m
@@ -13,6 +13,7 @@
// limitations under the License.
#import "StackMobAdditions.h"
+#import "NSString+URLEncoding.h"
@implementation NSDictionary (StackMobAdditions)
@@ -35,7 +36,7 @@ - (NSString*)queryString
}
argumentValue = [(NSString*)CFURLCreateStringByAddingPercentEscapes(NULL, (CFStringRef)preparedArgVal, NULL, CFSTR("?=&+"), CFStringConvertNSStringEncodingToEncoding(NSUTF8StringEncoding)) autorelease];
- [encodedPieces addObject:[NSString stringWithFormat:@"%@=%@", argumentKey, argumentValue]];
+ [encodedPieces addObject:[NSString stringWithFormat:@"%@=%@", [argumentKey URLEncodedString], [argumentValue URLEncodedString]]];
}
return [encodedPieces componentsJoinedByString:@"&"];

0 comments on commit 66c1c94

Please sign in to comment.