diff --git a/Mac/Scriptability/AppDelegate+Scriptability.swift b/Mac/Scriptability/AppDelegate+Scriptability.swift index f34a4b253..2b6b6f5db 100644 --- a/Mac/Scriptability/AppDelegate+Scriptability.swift +++ b/Mac/Scriptability/AppDelegate+Scriptability.swift @@ -40,10 +40,17 @@ extension AppDelegate : AppDelegateAppleEvents { @objc func getURL(_ event: NSAppleEventDescriptor, _ withReplyEvent: NSAppleEventDescriptor) { - guard let urlString = event.paramDescriptor(forKeyword: keyDirectObject)?.stringValue else { + guard var urlString = event.paramDescriptor(forKeyword: keyDirectObject)?.stringValue else { return } + // Special case URL with specific scheme handler x-netnewswire-feed: intended to ensure we open + // it regardless of which news reader may be set as the default + let nnwScheme = "x-netnewswire-feed:" + if urlString.hasPrefix(nnwScheme) { + urlString = urlString.replacingOccurrences(of: nnwScheme, with: "feed:") + } + let normalizedURLString = urlString.normalizedURL if !normalizedURLString.mayBeURL { return