[PATCH 10/16] send-email: sanitize_address use qq["foo"], not "\"foo\""
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Sep 30, 2010, 13:43 UTC
- Message-ID
- <1285854189-10240-11-git-send-email-avarab@gmail.com>
- In-Reply-To
- <1285854189-10240-1-git-send-email-avarab@gmail.com>
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.com> --- git-send-email.perl | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/git-send-email.perl b/git-send-email.perl index 1bf090a..c012b95 100755 --- a/git-send-email.perl +++ b/git-send-email.perl @@ -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";
-- 1.7.3.159.g610493