From eb8be0b0d0ca49f39502a855f4bcb4761257ab2f Mon Sep 17 00:00:00 2001 From: Alexey Martemyanov Date: Thu, 28 Nov 2024 20:59:39 +0600 Subject: [PATCH] bump BSK --- DuckDuckGo.xcodeproj/project.pbxproj | 2 +- .../xcshareddata/swiftpm/Package.resolved | 2 +- DuckDuckGo/ErrorPage/ErrorPageHTMLFactory.swift | 10 ++-------- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/DuckDuckGo.xcodeproj/project.pbxproj b/DuckDuckGo.xcodeproj/project.pbxproj index afa032b294..66b1f556fa 100644 --- a/DuckDuckGo.xcodeproj/project.pbxproj +++ b/DuckDuckGo.xcodeproj/project.pbxproj @@ -15223,7 +15223,7 @@ repositoryURL = "https://github.com/duckduckgo/BrowserServicesKit"; requirement = { kind = revision; - revision = c82310e0352a2ab6df72c9a4d828fac2300cd46a; + revision = b65fd02ab1ca29a73286f79f9da4678bc4af1789; }; }; 9FF521422BAA8FF300B9819B /* XCRemoteSwiftPackageReference "lottie-spm" */ = { diff --git a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 96c8950920..f755094ae0 100644 --- a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -32,7 +32,7 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/duckduckgo/BrowserServicesKit", "state" : { - "revision" : "c82310e0352a2ab6df72c9a4d828fac2300cd46a" + "revision" : "b65fd02ab1ca29a73286f79f9da4678bc4af1789" } }, { diff --git a/DuckDuckGo/ErrorPage/ErrorPageHTMLFactory.swift b/DuckDuckGo/ErrorPage/ErrorPageHTMLFactory.swift index 2e18ab996e..365483a9b7 100644 --- a/DuckDuckGo/ErrorPage/ErrorPageHTMLFactory.swift +++ b/DuckDuckGo/ErrorPage/ErrorPageHTMLFactory.swift @@ -28,10 +28,10 @@ enum ErrorPageHTMLFactory { static func html(for error: WKError, featureFlagger: FeatureFlagger, header: String? = nil) -> String { switch error as NSError { case is MaliciousSiteError where featureFlagger.isFeatureOn(.maliciousSiteProtectionErrorPage): - return specialErrorPageTemplateHtml + return SpecialErrorPageHTMLTemplate.htmlFromTemplate case is URLError where error.isServerCertificateUntrusted && featureFlagger.isFeatureOn(.sslCertificatesBypass): - return specialErrorPageTemplateHtml + return SpecialErrorPageHTMLTemplate.htmlFromTemplate default: return ErrorPageHTMLTemplate(error: WKError(_nsError: error as NSError), @@ -39,10 +39,4 @@ enum ErrorPageHTMLFactory { } } - public static let specialErrorPageTemplateHtml: String = { - guard let file = ContentScopeScripts.Bundle.path(forResource: "index", ofType: "html", inDirectory: "pages/special-error") else { fatalError("HTML template not found") } - guard let html = try? String(contentsOfFile: file) else { fatalError("Should be able to load template") } - return html - }() - }