Make WordPress Core

Ticket #4616: 4616.diff

File 4616.diff, 608 bytes (added by Nazgul, 17 years ago)
  • wp-includes/formatting.php

     
    666666
    667667
    668668function is_email($user_email) {
    669         $chars = "/^([a-z0-9+_]|\\-|\\.)+@(([a-z0-9_]|\\-)+\\.)+[a-z]{2,6}\$/i";
     669        $chars = "/^[a-z0-9!#$%&'*+\/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+\/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z]{2,6}$/i";
    670670        if (strpos($user_email, '@') !== false && strpos($user_email, '.') !== false) {
    671671                if (preg_match($chars, $user_email)) {
    672672                        return true;