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

Add additional isUrl check, closes #1462 #1864

Merged
merged 1 commit into from
Oct 6, 2020
Merged

Add additional isUrl check, closes #1462 #1864

merged 1 commit into from
Oct 6, 2020

Conversation

rickycodes
Copy link
Member

@rickycodes rickycodes commented Sep 30, 2020

Description

This adds some additional validation for when our regEx doesn't meet certain valid criteria.

As reported in #1462 the valid url https://vittominacori.github.io/watch-token/detail.html?address=0x4057950247e4ec8dc7fe399ec19ea43e80b931c8&network=mainnet&logo=http%3A%2F%2Fdanfinlay.com%2Fpics%2Favatar%2F64.jpg would search the url:

image

now the domain is treated as such and resolves correctly:

image

I've also confirmed that this fixes one other url that was failing to resolve correctly (reported in Slack)

Checklist

  • There is a related GitHub issue
  • Tests are included if applicable
  • Any added code is fully documented

Issue

Resolves #1462

@rickycodes rickycodes requested a review from a team as a code owner September 30, 2020 20:44
@rickycodes
Copy link
Member Author

rickycodes commented Sep 30, 2020

if you're wondering why i didn't drop the regEx entirely it's because is-url doesn't handle protocol-less input like google.ca:

image

I realize we should probably also refactor the regEx, but I really would rather not 🤷‍♀️

@rickycodes rickycodes mentioned this pull request Oct 1, 2020
3 tasks
@rickycodes rickycodes added needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) needs-qa Any New Features that needs a full manual QA prior to being added to a release. labels Oct 6, 2020
Copy link
Contributor

@estebanmino estebanmino 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

@ibrahimtaveras00 ibrahimtaveras00 left a comment

Choose a reason for hiding this comment

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

QA Passed 👍

@ibrahimtaveras00 ibrahimtaveras00 added QA Passed A successful QA run through has been done and removed needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) needs-qa Any New Features that needs a full manual QA prior to being added to a release. labels Oct 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
QA Passed A successful QA run through has been done
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Some URLs trigger search
3 participants