[wp-trac] [WordPress Trac] #55821: `is_email()` does not follow PHP FILTER_VALIDATE_EMAIL rules, when an email has double period (..)
WordPress Trac
noreply at wordpress.org
Wed May 25 10:44:30 UTC 2022
#55821: `is_email()` does not follow PHP FILTER_VALIDATE_EMAIL rules, when an email
has double period (..)
--------------------------+-----------------------------
Reporter: khokansardar | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Formatting | Version: 5.9.3
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
If there has a typo in an email address like there has double period .. in
an email address ( abc..def at xyz.com ). `is_email()` function return valid
email when we have use like -
{{{
is_email( 'abc..def at xyz.com' )
}}}
Where it should not return as valid email address. Which is working with
PHP `FILTER_VALIDATE_EMAIL` checking. When we are checking the same kind
of email with below code it return `boolean false`.
{{{
filter_var( 'abc..def at xyz.com', FILTER_VALIDATE_EMAIL )
}}}
Expected behaviour should be like this. When use `is_email()` function it
should respect like what PHP does.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/55821>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list