-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix email search #792
fix email search #792
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure whether this is the solution we are looking for. There is a more general problem with URL parsing which has to be addressed. Valid email is just a subset of this problem.
For example, try myemail,ee@gmail.com
. That's not a valid email, but it should trigger the search too.
@@ -99,6 +99,13 @@ public extension String { | |||
return isValidHostname || isValidIpHost | |||
} | |||
|
|||
var isValidEmail: Bool { | |||
print(self) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
print
@@ -138,6 +138,13 @@ extension URL { | |||
public var isValid: Bool { | |||
guard let navigationalScheme else { return false } | |||
|
|||
// Checks if is email if so is not considered a valid url | |||
var trimmedURL = absoluteString.dropping(prefix: "http://") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a big deal, but you can use NavigationalScheme.http.rawValue
and also NavigationalScheme.separator
This PR has been inactive for more than 7 days and will be automatically closed 7 days from now. |
This PR has been inactive for more than 7 days and will be automatically closed 7 days from now. |
This PR has been closed after 14 days of inactivity. Feel free to reopen it if you plan to continue working on it or have further discussions. |
Please review the release process for BrowserServicesKit here.
Required:
Task/Issue URL: https://app.asana.com/0/414709148257752/1207106552424205/f
iOS PR: duckduckgo/iOS#2777
macOS PR: https://github.com/duckduckgo/macos-browser/pull/2684
What kind of version bump will this require?: Patch
Description: Allows email addressed to be searched
Steps to test this PR:
<!—
Before submitting a PR, please ensure you have tested the combinations you expect the reviewer to test, then delete configurations you know do not need explicit testing.
Using a simulator where a physical device is unavailable is acceptable.
—>
OS Testing:
—
Internal references:
Software Engineering Expectations
Technical Design Template