Skip to content

Commit

Permalink
define explicit list of characters to encode
Browse files Browse the repository at this point in the history
  • Loading branch information
djih committed Sep 18, 2017
1 parent 899a3da commit 08ae8b0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Amplitude/Amplitude.m
Original file line number Diff line number Diff line change
Expand Up @@ -1535,7 +1535,8 @@ - (NSString*)md5HexDigest:(NSString*)input

- (NSString*)urlEncodeString:(NSString*) string
{
return [string stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
NSCharacterSet * allowedCharacters = [[NSCharacterSet characterSetWithCharactersInString:@":/?#[]@!$ &'()*+,;=\"<>%{}|\\^~`"] invertedSet];
return [string stringByAddingPercentEncodingWithAllowedCharacters:allowedCharacters];
}

- (NSDate*) currentTime
Expand Down

0 comments on commit 08ae8b0

Please sign in to comment.