More robust is_email() and sanitize_email() functions
|Reported by:||sambauers||Owned by:|
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.