diff options
-rw-r--r-- | Source/SPAppController.m | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Source/SPAppController.m b/Source/SPAppController.m index 4f985133..458c62f9 100644 --- a/Source/SPAppController.m +++ b/Source/SPAppController.m @@ -813,7 +813,14 @@ pathComponents = [[[url absoluteString] substringToIndex:[[url absoluteString] length]-1] pathComponents]; else pathComponents = [[url absoluteString] pathComponents]; - + + // remove percent encoding + NSMutableArray *decodedPathComponents = [NSMutableArray arrayWithCapacity:pathComponents.count]; + for (NSString *component in pathComponents) { + [decodedPathComponents addObject:component.stringByRemovingPercentEncoding]; + } + pathComponents = decodedPathComponents.copy; + if([pathComponents count] > 2) parameter = [pathComponents subarrayWithRange:NSMakeRange(2, [pathComponents count]-2)]; else |