mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-24 04:38:16 +00:00
Fix warning from using -stringByAddingPercentEscapesUsingEncoding:
This commit is contained in:
1 parent
d22ef79d9e
commit
f8ef9608dc
1 file changed
+3
-4
Vendored
+3
-4
@@ -769,10 +769,9 @@ NSString *const SUUpdaterAppcastNotificationKey = @"SUUpdaterAppCastNotification
|
||||
}
|
||||
|
||||
static NSString *escapeURLComponent(NSString *str) {
|
||||
return [[[[str stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]
|
||||
stringByReplacingOccurrencesOfString:@"=" withString:@"%3d"]
|
||||
stringByReplacingOccurrencesOfString:@"&" withString:@"%26"]
|
||||
stringByReplacingOccurrencesOfString:@"+" withString:@"%2b"];
|
||||
NSString *escapedString = [str stringByAddingPercentEncodingWithAllowedCharacters:NSCharacterSet.URLQueryAllowedCharacterSet];
|
||||
|
||||
return [[[escapedString stringByReplacingOccurrencesOfString:@"=" withString:@"%3d"] stringByReplacingOccurrencesOfString:@"&" withString:@"%26"] stringByReplacingOccurrencesOfString:@"+" withString:@"%2b"];
|
||||
}
|
||||
|
||||
// Precondition: The feed URL should be valid
|
||||
|
||||
Reference in new issue
Block a user