From: Grant Paul Date: Mon, 31 Jan 2011 07:31:59 +0000 (-0800) Subject: Fix cydia://url/ links when they include a slash. X-Git-Tag: v1.1.0%b1~367^2~10 X-Git-Url: https://git.saurik.com/cydia.git/commitdiff_plain/f70ea8991859d6fe70cc14696fa5e0dfc512ed66 Fix cydia://url/ links when they include a slash. --- diff --git a/MobileCydia.mm b/MobileCydia.mm index 0076c423..1596c380 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -8744,7 +8744,11 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { CYViewController *controller = nil; - if ([components count] == 1) { + if ([base isEqualToString:@"url"]) { + controller = [[[CYBrowserController alloc] init] autorelease]; + NSArray *arguments([components subarrayWithRange:NSMakeRange(1, [components count] - 1)]); + [(CYBrowserController *)controller loadURL:[NSURL URLWithString:[arguments componentsJoinedByString:@""]]]; + } else if ([components count] == 1) { if ([base isEqualToString:@"storage"]) { controller = [[[CYBrowserController alloc] init] autorelease]; [(CYBrowserController *)controller loadURL:[NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"storage" ofType:@"html"]]]; @@ -8800,11 +8804,6 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { } } - if ([base isEqualToString:@"url"]) { - controller = [[[CYBrowserController alloc] init] autorelease]; - [(CYBrowserController *)controller loadURL:[NSURL URLWithString:argument]]; - } - if ([base isEqualToString:@"launch"]) { [self launchApplicationWithIdentifier:argument suspended:NO]; return nil;