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

Controversial UTF-8 characters #21

Closed
1oglop1 opened this issue Oct 18, 2023 · 2 comments
Closed

Controversial UTF-8 characters #21

1oglop1 opened this issue Oct 18, 2023 · 2 comments

Comments

@1oglop1
Copy link

1oglop1 commented Oct 18, 2023

Hi, I was comparing this crate with validator crate, you mentioned in #16.

And I have an email with a controversial character � - https://en.wikipedia.org/wiki/Specials_(Unicode_block)
Then email_address and validator do not agree if it is valid or notabc�def@example.com

let email = "abc�def@example.com";
EmailAddress::from_str(email).is_ok(); // true
validator::validate_email(email);  // false

At the moment this crate allows valid email with UTF8 - I guess that's according to

perhaps this could be part of parse_with_options suggested in #20.

Probably the best thing for the community would be to have just one crate for email validation.

@johnstonskj
Copy link
Owner

This is a defect. The is_uchar test was way to permissive. Have replaced it with is_utf8_non_ascii as it should be. Release soon.

johnstonskj added a commit that referenced this issue Jul 31, 2024
Replace `is_uchar` with the correct `is_utf8_non_ascii`.
Fixes Github issue #21
@johnstonskj
Copy link
Owner

See release 0.2.9

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

No branches or pull requests

2 participants