diff --git a/ios/brave-ios/Sources/Brave/Frontend/Browser/TabManager.swift b/ios/brave-ios/Sources/Brave/Frontend/Browser/TabManager.swift index 872aa253b3f6..f0b3339c189a 100644 --- a/ios/brave-ios/Sources/Brave/Frontend/Browser/TabManager.swift +++ b/ios/brave-ios/Sources/Brave/Frontend/Browser/TabManager.swift @@ -622,7 +622,10 @@ class TabManager: NSObject { && Preferences.Privacy.persistentPrivateBrowsing.value) // WebKit can sometimes return a URL that isn't valid at all! - if let requestURL = request?.url, NSURL(idnString: requestURL.absoluteString) == nil { + // Do not allow configuring a tab with a Bookmarklet or Javascript URL + if let requestURL = request?.url, + NSURL(idnString: requestURL.absoluteString) == nil || requestURL.isBookmarklet + { request?.url = TabManager.aboutBlankBlockedURL }