summaryrefslogtreecommitdiff
path: root/MobileCydia.mm
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2011-03-09 22:14:32 -0800
committerJay Freeman (saurik) <saurik@saurik.com>2011-03-09 22:14:32 -0800
commit84851d87e0bc7d4fcc068abb56d077a0c548ca80 (patch)
tree6ef8a42981b4733e6894107b11364d6ad55adb0a /MobileCydia.mm
parent33e303803fcca13b472d2ecb5cb15f038074078e (diff)
Fix various forms of icon escape encoding.
Diffstat (limited to 'MobileCydia.mm')
-rw-r--r--MobileCydia.mm8
1 files changed, 3 insertions, 5 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm
index de34030..ab82735 100644
--- a/MobileCydia.mm
+++ b/MobileCydia.mm
@@ -2606,14 +2606,12 @@ struct PackageNameOrdering :
if (parsed_ != NULL)
if (NSString *href = parsed_->icon_)
if ([href hasPrefix:@"file:///"])
- // XXX: correct escaping
- icon = [UIImage imageAtPath:[href substringFromIndex:7]];
+ icon = [UIImage imageAtPath:[[href substringFromIndex:7] stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
if (icon == nil) if (section != nil)
- icon = [UIImage imageAtPath:[NSString stringWithFormat:@"%@/Sections/%@.png", App_, section]];
+ icon = [UIImage imageAtPath:[NSString stringWithFormat:@"%@/Sections/%@.png", App_, [section stringByReplacingOccurrencesOfString:@" " withString:@"_"]]];
if (icon == nil) if (Source *source = [self source]) if (NSString *dicon = [source defaultIcon])
if ([dicon hasPrefix:@"file:///"])
- // XXX: correct escaping
- icon = [UIImage imageAtPath:[dicon substringFromIndex:7]];
+ icon = [UIImage imageAtPath:[[dicon substringFromIndex:7] stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
if (icon == nil)
icon = [UIImage applicationImageNamed:@"unknown.png"];
return icon;