Skip to content
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 address bar queries when doing math expressions #952

Merged
merged 2 commits into from
Aug 25, 2024

Conversation

jotaemepereira
Copy link
Contributor

Task/Issue URL: https://app.asana.com/0/1204006570077678/1208002970105121/f
iOS PR: duckduckgo/iOS#3262
macOS PR: duckduckgo/macos-browser#3130
What kind of version bump will this require?: Minor

Description:
This pull request introduces a change on how we check for valid hostnames. The current regurlar expression had an issue where some mathematical expressions where valid hostnames.

Steps to test this PR:
Follow the tests provided for each platform pull request.

Internal references:

Software Engineering Expectations
Technical Design Template

@jotaemepereira jotaemepereira requested review from a team and alessandroboron and removed request for a team August 21, 2024 15:47
@jotaemepereira jotaemepereira force-pushed the juan/fix-address-bar-calculations branch 2 times, most recently from a486a77 to 680f8fc Compare August 21, 2024 17:19
}
}

func testWhenStringIsInvalidHost_thenValidHostIsFalse() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Contributor

@alessandroboron alessandroboron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Contributor

@tomasstrba tomasstrba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgmt! 👏

@jotaemepereira jotaemepereira force-pushed the juan/fix-address-bar-calculations branch from 46e64e1 to 21a0eb4 Compare August 25, 2024 23:29
@jotaemepereira jotaemepereira merged commit c92b865 into main Aug 25, 2024
7 checks passed
@jotaemepereira jotaemepereira deleted the juan/fix-address-bar-calculations branch August 25, 2024 23:33
jotaemepereira added a commit to duckduckgo/iOS that referenced this pull request Aug 26, 2024
Task/Issue URL:
https://app.asana.com/0/1204006570077678/1208002970105121/f
BSK PR: duckduckgo/BrowserServicesKit#952

**Description**:
This pull request introduces a change on how we check for valid
hostnames. The current regurlar expression had an issue where some
mathematical expressions where valid hostnames.

Also, following the philosophy about leaving the code a bit better when
you touched it. I’ve added tests for the query submitted flow on the
`OmniBar`.

This PR fixes 

**Steps to test this PR**:
1. Open the app
2. Put `16385-12228.75` in the address bar
3. This should do a search on our SERP instead of trying to open a
webpage
4. Test other usual web sites URLs and check those are working.

**Definition of Done (Internal Only)**:

* [x] Does this PR satisfy our [Definition of
Done](https://app.asana.com/0/1202500774821704/1207634633537039/f)?
jotaemepereira added a commit to duckduckgo/macos-browser that referenced this pull request Aug 26, 2024
Task/Issue URL:
https://app.asana.com/0/1204006570077678/1208002970105121/f
Tech Design URL:
CC:


**Description**:
This pull request introduces a change on how we check for valid
hostnames. The current regurlar expression had an issue where some
mathematical expressions where valid hostnames.

BSK PR: duckduckgo/BrowserServicesKit#952

**Steps to test this PR**:
1. Open the app
2. Put 16385-12228.75 in the address bar
3. This should do a search on our SERP instead of trying to open a
webpage
4. Test other usual web sites URLs and check those are working.

**Definition of Done**:

* [x] Does this PR satisfy our [Definition of
Done](https://app.asana.com/0/1202500774821704/1207634633537039/f)?
samsymons added a commit that referenced this pull request Aug 28, 2024
* main:
  Unified feedback form for Privacy Pro (#922)
  bump privacy-dashboard to 5.1.1 (#955)
  Bump Tests/BrowserServicesKitTests/Resources/privacy-reference-tests from `afb4f61` to `6133e7d` (#962)
  Freemium PIR - Add Desktop RMF Attribute (#960)
  Fix address bar queries when doing math expressions (#952)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants