]> git.saurik.com Git - cydia.git/commitdiff
Fix stupidness introduced by last commit; correctly fix cydia://url/* URLs. make-me-a-sandwich
authorGrant Paul <chpwn@chpwn.com>
Mon, 31 Jan 2011 07:42:16 +0000 (23:42 -0800)
committerGrant Paul <chpwn@chpwn.com>
Mon, 31 Jan 2011 07:42:16 +0000 (23:42 -0800)
MobileCydia.mm

index 1596c3807b9ef7a8f195c819b3afbae82328f66e..2e7abadaf802b3fb12fabb6c6bd6da2484d43b2f 100644 (file)
@@ -8745,9 +8745,10 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
     CYViewController *controller = nil;
 
     if ([base isEqualToString:@"url"]) {
+        // This kind of URL can contain slashes in the argument, so we can't parse them below.
+        NSString *destination = [[url absoluteString] substringFromIndex:([scheme length] + [@"://" length] + [base length] + [@"/" length])];
         controller = [[[CYBrowserController alloc] init] autorelease];
-        NSArray *arguments([components subarrayWithRange:NSMakeRange(1, [components count] - 1)]);
-        [(CYBrowserController *)controller loadURL:[NSURL URLWithString:[arguments componentsJoinedByString:@""]]];
+        [(CYBrowserController *)controller loadURL:[NSURL URLWithString:destination]];
     } else if ([components count] == 1) {
         if ([base isEqualToString:@"storage"]) {
             controller = [[[CYBrowserController alloc] init] autorelease];