Browse Source

Replace stringByAddingPercentEscapesUsingEncoding (Fix #111)

Signed-off-by: Carola Nitz <nitz.carola@googlemail.com>
Victor Gama 7 years ago
parent
commit
2f3a72de43

+ 1 - 1
SharedSources/ServerBrowsing/HTTP/VLCNetworkServerBrowserSharedLibrary.m

@@ -91,7 +91,7 @@
         _duration = dictionary[@"duration"];
         NSString *subtitleURLString = dictionary[@"pathSubtitle"];
         if ([subtitleURLString isEqualToString:@"(null)"]) subtitleURLString = nil;
-        subtitleURLString = [subtitleURLString stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
+        subtitleURLString = [subtitleURLString stringByAddingPercentEncodingWithAllowedCharacters:NSCharacterSet.URLHostAllowedCharacterSet];
         _subtitleURL = subtitleURLString.length ? [NSURL URLWithString:subtitleURLString] : nil;
         _URL = [NSURL URLWithString:dictionary[@"pathfile"]];
         _container = NO;