WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 3 years ago

#43108 closed defect (bug) (duplicate)

sanitize_email returns null for emails without . / tld

Reported by: raisonon Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Formatting Keywords:
Focuses: Cc:

Description

According to the latest HTML5 specification the following examples counts as correctly formatted email:

email@localhost OR susan@domain

reference: https://html.spec.whatwg.org/multipage/input.html#valid-e-mail-address

When using sanitize_email() with an email formatted the result is null. It shouldn't.

sanitize_email('hello@email') outputs null it should output hello@email

--
aside: not sure correct way to describe -- no . or no tld -- eitherway, hope example displays what i mean.

Change History (1)

#1 @ocean90
3 years ago

  • Component changed from General to Formatting
  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed
  • Version 4.9.2 deleted

Duplicate of #17433 and #30039.

Note: See TracTickets for help on using tickets.