diff --git a/Classes/Views/Channel View/TVCLogPolicy.m b/Classes/Views/Channel View/TVCLogPolicy.m index d74f696d69..cd602a8ede 100755 --- a/Classes/Views/Channel View/TVCLogPolicy.m +++ b/Classes/Views/Channel View/TVCLogPolicy.m @@ -201,7 +201,26 @@ - (void)webView:(WebView *)webView decidePolicyForNavigationAction:(NSDictionary if (action == WebNavigationTypeLinkClicked) { [listener ignore]; - [TLOpenLink open:actionInformation[WebActionOriginalURLKey]]; + NSURL *actionURL = actionInformation[WebActionOriginalURLKey]; + + if (NSObjectsAreEqual([actionURL scheme], @"http") == NO && + NSObjectsAreEqual([actionURL scheme], @"https") == NO && + NSObjectsAreEqual([actionURL scheme], @"textual") == NO) + { + BOOL openLink = + [TLOPopupPrompts dialogWindowWithMessage:TXTLS(@"BasicLanguage[1290][2]") + title:TXTLS(@"BasicLanguage[1290][1]", [actionURL absoluteString]) + defaultButton:TXTLS(@"BasicLanguage[1290][3]") + alternateButton:TXTLS(@"BasicLanguage[1009]") + suppressionKey:@"open_non_http_url_warning" + suppressionText:nil]; + + if (openLink == NO) { + return; + } + } + + [TLOpenLink open:actionURL]; } else { [listener use]; } diff --git a/Frameworks/Auto Hyperlinks b/Frameworks/Auto Hyperlinks index e979cc9c36..55f5009f0b 160000 --- a/Frameworks/Auto Hyperlinks +++ b/Frameworks/Auto Hyperlinks @@ -1 +1 @@ -Subproject commit e979cc9c361b77d1f8db8036a8922e149e738368 +Subproject commit 55f5009f0b65c2aa68d9963d81dec0f5eb1d2ab0 diff --git a/Resources/Language Files/BasicLanguage.strings b/Resources/Language Files/BasicLanguage.strings index 35e05f2181..4e7312a152 100644 --- a/Resources/Language Files/BasicLanguage.strings +++ b/Resources/Language Files/BasicLanguage.strings @@ -784,9 +784,14 @@ "BasicLanguage[1287][2]" = "Would you like to launch the “Textual Extras” installer to perform update?"; "BasicLanguage[1287][3]" = "Launch Installer"; +/* Non-HTTP link warning */ +"BasicLanguage[1290][1]" = "Please verify that you would like to open the following URL: %@"; +"BasicLanguage[1290][2]" = "The linked you clicked will launch an application other than your web browser which could possibly lead to the leak of your personal information."; +"BasicLanguage[1290][3]" = "I Understand, Continue"; -/* Next unusued key: 1290 */ + +/* Next unusued key: 1291 */ diff --git a/Resources/Property Lists/RegisteredUserDefaults.plist b/Resources/Property Lists/RegisteredUserDefaults.plist index fe03bbcc4f..b38eb38262 100644 --- a/Resources/Property Lists/RegisteredUserDefaults.plist +++ b/Resources/Property Lists/RegisteredUserDefaults.plist @@ -2,6 +2,20 @@ + com.adiumX.AutoHyperlinks.permittedSchemes + + feed + ftp + irc + ircs + itms + sftp + ssh + telnet + textual + webcal + x-man-page + -[NSString isValidInternetAddress] Performs Extended Validation AutojoinMaximumChannelJoinCount