#9316 closed enhancement (fixed)
More robust is_email() and sanitize_email() functions
| Reported by: | sambauers | Owned by: | |
|---|---|---|---|
| Priority: | low | Milestone: | 2.8 |
| Component: | General | Version: | 2.7.1 |
| Severity: | minor | Keywords: | has-patch |
| Cc: | Focuses: |
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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
(In [10769]) Improved is_email() and sanitize_email(). Props sambauers. fixes #9316 #4616