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

Bad RegExp #36083

Closed
srkleiman opened this issue Sep 27, 2024 · 3 comments
Closed

Bad RegExp #36083

srkleiman opened this issue Sep 27, 2024 · 3 comments
Labels
closed: question A user misinterpretation or support question. No action required. Content:HTML Hypertext Markup Language docs

Comments

@srkleiman
Copy link

srkleiman commented Sep 27, 2024

MDN URL

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/email

What specific section or headline is this issue about?

Basic validation

What information was incorrect, unhelpful, or incomplete?

The RE for email validation has an unescaped '/' at the 22nd character.

What did you expect to see?

/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/

Do you have any supporting links, references, or citations?

No response

Do you have anything more you want to share?

No response

MDN metadata

Page report details
@srkleiman srkleiman added the needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. label Sep 27, 2024
@github-actions github-actions bot added the Content:HTML Hypertext Markup Language docs label Sep 27, 2024
@Josh-Cena
Copy link
Member

The "22nd character" is inside a character class and slashes don't need to be escaped there.

@Josh-Cena Josh-Cena closed this as not planned Won't fix, can't repro, duplicate, stale Sep 27, 2024
@Josh-Cena Josh-Cena added closed: question A user misinterpretation or support question. No action required. and removed needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. labels Sep 27, 2024
@srkleiman
Copy link
Author

srkleiman commented Sep 27, 2024 via email

@Josh-Cena
Copy link
Member

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed: question A user misinterpretation or support question. No action required. Content:HTML Hypertext Markup Language docs
Projects
None yet
Development

No branches or pull requests

2 participants