Merge branch 'master' into next
[gitweb.git] / git-send-email.perl
index ed1d89b3f73564715d0fe4061e87f63fea7e7be2..a7a77977787d1d1fcc98d9fa4dc745162d6fde04 100755 (executable)
@@ -314,18 +314,15 @@ sub extract_valid_address {
        my $address = shift;
 
        # check for a local address:
-       return $address if ($address =~ /^([\w\-]+)$/);
+       return $address if ($address =~ /^([\w\-.]+)$/);
 
        if ($have_email_valid) {
                return Email::Valid->address($address);
        } else {
                # less robust/correct than the monster regexp in Email::Valid,
                # but still does a 99% job, and one less dependency
-               my $cleaned_address;
-               if ($address =~ /([^\"<>\s]+@[^<>\s]+)/) {
-                       $cleaned_address = $1;
-               }
-               return $cleaned_address;
+               $address =~ /([\w\-.]+@[\w\-.]+)/;
+               return $1;
        }
 }