Skip to content

Commit

Permalink
Uplift of #26359 (squashed) to beta
Browse files Browse the repository at this point in the history
  • Loading branch information
brave-builds committed Nov 4, 2024
1 parent 006619f commit 367db3b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ios/brave-ios/Sources/Shared/URIFixup.swift
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,16 @@ public class URIFixup {
return nil
}

if match.type == .urlWhatYouTyped {
if [.bookmarkTitle, .historyUrl, .openTab, .urlWhatYouTyped].contains(match.type) {
return match.destinationURL
}

if match.type == .searchWhatYouTyped {
// Technically we should be returning `destinationURL` here.
// But if the user's default search engine is `Google`, then `destinationURL` will be `BraveSearch`!
// That's because we don't use Chromium's `SearchEngine` shared in Brave-Core, and we use our own!
// If we ever refactor to use the SearchEngine logic from Brave-Core, we can safely return `destinationURL` here,
// and get rid of ALL of the above code entirely.
return nil
}

Expand Down

0 comments on commit 367db3b

Please sign in to comment.