mirror of
https://github.com/git/git.git
synced 2024-11-24 18:33:43 +08:00
send-email: sanitize_address use qq["foo"], not "\"foo\""
Perl provides an alternate quote syntax which can make using "" inside interpolated strings easier to read. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.comReviewed-by: Avery Pennarun <apenwarr@gmail.com> Reviewed-by: Jeff King <peff@peff.net> > Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
ff48389731
commit
d5c7d69d0f
@ -881,7 +881,7 @@ sub sanitize_address {
|
||||
# double quotes are needed if specials or CTLs are included
|
||||
elsif ($recipient_name =~ /[][()<>@,;:\\".\000-\037\177]/) {
|
||||
$recipient_name =~ s/(["\\\r])/\\$1/g;
|
||||
$recipient_name = "\"$recipient_name\"";
|
||||
$recipient_name = qq["$recipient_name"];
|
||||
}
|
||||
|
||||
return "$recipient_name $recipient_addr";
|
||||
|
Loading…
Reference in New Issue
Block a user