send-email: discard blank around address in extract_valid_address as well.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Stephen Rothwell 2007-07-13 08:54:06 -07:00 committed by Junio C Hamano
parent b06c6bc831
commit 689b4d552b

View File

@ -410,7 +410,7 @@ sub extract_valid_address {
return $address if ($address =~ /^($local_part_regexp)$/);
if ($have_email_valid) {
$address =~ s/^<(.*)>$/$1/;
$address =~ s/^\s*<(.*)>\s*$/$1/;
return scalar Email::Valid->address($address);
} else {
# less robust/correct than the monster regexp in Email::Valid,