#9316 closed enhancement (fixed)
More robust is_email() and sanitize_email() functions
Reported by: | sambauers | Owned by: | |
---|---|---|---|
Milestone: | 2.8 | Priority: | low |
Severity: | minor | Version: | 2.7.1 |
Component: | General | Keywords: | has-patch |
Focuses: | Cc: |
Description
Attached patch includes robust and filterable is_email() and sanitize_email() functions.
These functions split up the validation into distinct stages rather than trying to use a single PCRE function. The reason for failure is made available via the filters.
Also included in is_email() is an optional DNS check (where supported by PHP).
Although not quite RFC compliant, it addresses most of the issues in #4616, and also allows easier filtering for those who want to implement RFC compliance via plugins.
Attachments (2)
Change History (7)
Note: See
TracTickets for help on using
tickets.
(In [10769]) Improved is_email() and sanitize_email(). Props sambauers. fixes #9316 #4616