Ticket #25108: 25108.diff
File 25108.diff, 816 bytes (added by , 12 years ago) |
---|
-
wp-includes/formatting.php
1855 1855 return apply_filters( 'is_email', false, $email, 'domain_no_periods' ); 1856 1856 } 1857 1857 1858 $i = 0; 1858 1859 // Loop through each sub 1859 1860 foreach ( $subs as $sub ) { 1860 1861 // Test for leading and trailing hyphens and whitespace … … 1866 1867 if ( !preg_match('/^[a-z0-9-]+$/i', $sub ) ) { 1867 1868 return apply_filters( 'is_email', false, $email, 'sub_invalid_chars' ); 1868 1869 } 1870 1871 // Test for fewer than 2 characters in last sub 1872 if ( ++$i === count( $subs ) && strlen( $sub ) < 2 ) 1873 return apply_filters( 'is_email', false, $email, 'last_sub_too_few_chars' ); 1869 1874 } 1870 1875 1871 1876 // Congratulations your email made it!