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

Mailadress with hex character C2 A0 (UTF8 no-break space) is considered valid #386

Open
manuelkiessling opened this issue Jun 18, 2024 · 1 comment

Comments

@manuelkiessling
Copy link

The following is my new best friend, an "invisible" character with dec value 194 160, hex value C2 A0:  .

While this GitHub Issues website probably renders it as a normal space (hex 20), it is in reality the UTF-8 "NO-BREAK SPACE" character.
See entry number 2 in the "Encodings" table at https://en.wikipedia.org/wiki/Non-breaking_space.

I've also attached file c2a0-demo.txt which contains an address with the problematic character.

EmailValidator considers an email address like j.doe @example.com, with C2 A0 in front of the @ symbol, as valid, while j.doe @example.com, with a "normal" hex 20 space in front of the @, is considered invalid.

@manuelkiessling
Copy link
Author

So yeah, GitHub Issues renders the example strings in the above comment moot — use file https://github.com/user-attachments/files/15884196/c2a0-demo.txt if you need working examples.

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

1 participant