Do not escape url string as they should already be completly escaped (fixes #743)

This commit is contained in:
Michael Starke
2018-03-13 17:05:16 +01:00
parent 6975cc3945
commit 642477ce5c

View File

@@ -686,10 +686,10 @@ NSString *const _MPTableSecurCellView = @"PasswordCell";
KPKEntry *selectedEntry = nodes.count == 1 ? [nodes.firstObject asEntry] : nil;
NSString *expandedURL = [selectedEntry.url kpk_finalValueForEntry:selectedEntry];
if(expandedURL.length > 0) {
NSURL *webURL = [NSURL URLWithString:[expandedURL stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
NSURL *webURL = [NSURL URLWithString:expandedURL];
NSString *scheme = webURL.scheme;
if(!scheme) {
webURL = [NSURL URLWithString:[NSString stringWithFormat:@"http://%@", [expandedURL stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]];
webURL = [NSURL URLWithString:[NSString stringWithFormat:@"http://%@", expandedURL]];
}
NSString *browserBundleID = [NSUserDefaults.standardUserDefaults stringForKey:kMPSettingsKeyBrowserBundleId];