From 732263d411fe2e3e29ee9fa1c2ad1a20bdea062c Mon Sep 17 00:00:00 2001 From: "Robin H. Johnson" Date: Wed, 25 Apr 2007 19:37:19 -0700 Subject: [PATCH] Perform correct quoting of recipient names. Always perform quoting of the recipient names if they contain periods, previously only the author's address was treated this way. This stops sendmail binaries from exploding the name into bad addresses. Signed-off-by: Robin H. Johnson Signed-off-by: Junio C Hamano --- git-send-email.perl | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/git-send-email.perl b/git-send-email.perl index ad83009e2..e4fe8965b 100755 --- a/git-send-email.perl +++ b/git-send-email.perl @@ -431,9 +431,22 @@ sub unquote_rfc2047 { return "$_"; } +# If an address contains a . in the name portion, the name must be quoted. +sub sanitize_address_rfc822 +{ + my ($recipient) = @_; + my ($recipient_name) = ($recipient =~ /^(.*?)\s+