formio / formio.js

JavaScript powered Forms with JSON Form Builder

Home Page:https://formio.github.io/formio.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Using Curly (“”) Quotes Does Not Invalidate Email Addresses

vijaivir opened this issue · comments

Describe the bug
When invalidating email addresses in Form.io, addresses that use curly quotes (“”) are considered valid. See the difference between using straight vs curly quotes here.

Version/Branch
Current version, however, the bug can be observed on the Form.io portal.

To Reproduce
Steps to reproduce the behavior:

  1. Navigate to the Form.io portal.
  2. Enter the email address just"not"right@example.com. As this is an invalid email address as per the RFC5322 it should be invalidated, and Form.io correctly does so.
Screenshot 2024-02-05 at 8 45 26 AM
  1. Now enter the email address just“not”right@example.com using curly quotes, and Form.io will fail to invalidate it.
Screenshot 2024-02-05 at 8 56 46 AM

Expected behavior
I haven't tested this against any other special characters but emails using curly quotes should still be invalidated as can be observed on many other platforms such as GitHub (verify on the Sign Up page)

This is probably due to the regex validation we currently use to validate email addresses in the email component, I believe this would be solved by simply modifying this test to include curly quotes as well. Would you be willing to submit a PR and a test for this?