summaryrefslogtreecommitdiff
path: root/CyteKit/WebViewController.mm
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2014-11-04 23:51:28 -0800
committerJay Freeman (saurik) <saurik@saurik.com>2014-11-05 00:54:18 -0800
commitc623466b01da346cafe5cdd1039ed608326d9a5c (patch)
tree238f8df78b46fec8f7687c2ecb5ba5d1f43c578c /CyteKit/WebViewController.mm
parent6218c58ce1228c98d2fc8da5ff22fb23b01c051b (diff)
Try harder to block all iTunes-related redirects.
Diffstat (limited to 'CyteKit/WebViewController.mm')
-rw-r--r--CyteKit/WebViewController.mm12
1 files changed, 11 insertions, 1 deletions
diff --git a/CyteKit/WebViewController.mm b/CyteKit/WebViewController.mm
index f1448e1..33524f3 100644
--- a/CyteKit/WebViewController.mm
+++ b/CyteKit/WebViewController.mm
@@ -462,7 +462,17 @@ float CYScrollViewDecelerationRateNormal;
#endif
NSURL *url(request == nil ? nil : [request URL]);
- if ([[url scheme] isEqualToString:@"itms-appss"] || [[url absoluteString] hasPrefix:@"https://itunes.apple.com/app/"]) {
+ NSString *scheme([[url scheme] lowercaseString]);
+ NSString *absolute([[url absoluteString] lowercaseString]);
+
+ if (
+ [scheme isEqualToString:@"itms"] ||
+ [scheme isEqualToString:@"itmss"] ||
+ [scheme isEqualToString:@"itms-apps"] ||
+ [scheme isEqualToString:@"itms-appss"] ||
+ [absolute hasPrefix:@"http://itunes.apple.com/"] ||
+ [absolute hasPrefix:@"https://itunes.apple.com/"] ||
+ false) {
appstore_ = url;
UIAlertView *alert = [[[UIAlertView alloc]