summaryrefslogtreecommitdiff
path: root/Juick/Helpers/NSURL+PathParameters.m
diff options
context:
space:
mode:
Diffstat (limited to 'Juick/Helpers/NSURL+PathParameters.m')
-rw-r--r--Juick/Helpers/NSURL+PathParameters.m8
1 files changed, 1 insertions, 7 deletions
diff --git a/Juick/Helpers/NSURL+PathParameters.m b/Juick/Helpers/NSURL+PathParameters.m
index 83a55bb..6752757 100644
--- a/Juick/Helpers/NSURL+PathParameters.m
+++ b/Juick/Helpers/NSURL+PathParameters.m
@@ -35,13 +35,7 @@
@implementation NSString (URLParameters)
- (NSString *)stringByEscapingForURLArgument {
- // Encode all the reserved characters, per RFC 3986 (<http://www.ietf.org/rfc/rfc3986.txt>)
- NSString *escapedString = (__bridge NSString *)CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault,
- (CFStringRef)self,
- NULL,
- (CFStringRef)@"!*'\"();:@&=+$,/?%#[] ",
- kCFStringEncodingUTF8);
- return [escapedString copy];
+ return [self stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet characterSetWithCharactersInString:@"!*'\"();:@&=+$,/?%#[] "]];
}
@end