send-email: use sanitized address for cc
PATCH 1/1 send-email: use sanitized address for cc
From: "Du, Changbin" <[email protected]>
Some username in the email address may include a ','. In this case, we need quoting the username field so it will not be parsed as two single addresses by Mail::Address->parse().
For example, my eamil address "Du, Changbin <[email protected]>" can be parsed as two addresses "Du" and "Changbin <[email protected]>" if username is not quoted. ("Du, Changbin" is a legal format of signature in Chinese)
The sanitized address can be used because quote is added automactically.
Signed-off-by Du, Changbin <[email protected]>
--- git-send-email.perl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
git-send-email.perl +2 -2
@@ -1554,9 +1554,9 @@ foreach my $t (@files) { next if $suppress_cc{'sob'} and $what =~ /Signed-off-by/i; next if $suppress_cc{'bodycc'} and $what =~ /Cc/i; } - push @cc, $c; + push @cc, $sc; printf("(body) Adding cc: %s from line '%s'\n", - $c, $_) unless $quiet; + $sc, $_) unless $quiet; } } close $fh;
Signature · 1 line
2.7.4