From f2fc729b69a28ae671a947f6e2bab4131946af23 Mon Sep 17 00:00:00 2001
From: Bi11 <Bi11gates9999@gmail.com>
Date: Thu, 3 Sep 2020 16:37:13 +0800
Subject: [PATCH] Support App Store URL scheme in release note webview

---
 Sparkle/SUUpdateAlert.m | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Sparkle/SUUpdateAlert.m b/Sparkle/SUUpdateAlert.m
index 0848bae51d..040b5a747d 100644
--- a/Sparkle/SUUpdateAlert.m
+++ b/Sparkle/SUUpdateAlert.m
@@ -353,7 +353,7 @@ - (void)webView:(WebView *)__unused sender decidePolicyForNavigationAction:(NSDi
     NSURL *requestURL = request.URL;
     NSString *scheme = requestURL.scheme;
     BOOL isAboutBlank = [requestURL.absoluteString isEqualToString:@"about:blank"];
-    BOOL whitelistedSafe = [scheme isEqualToString:@"http"] || [scheme isEqualToString:@"https"] || isAboutBlank;
+    BOOL whitelistedSafe = isAboutBlank || [@[@"http", @"https", @"macappstore", @"macappstores", @"itms-apps", @"itms-appss"] containsObject:scheme];
 
     // Do not allow redirects to dangerous protocols such as file://
     if (!whitelistedSafe) {