From: Robin H. Johnson Date: Thu, 26 Apr 2007 02:37:19 GMT Subject: [PATCH 5/9] Perform correct quoting of recipient names. Message-ID: <11775550432746-git-send-email-robbat2@gentoo.org> In-Reply-To: <11775550433288-git-send-email-robbat2@gentoo.org> From: Robin H. Johnson 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 --- git-send-email.perl | 19 ++++++++++++++----- 1 files changed, 14 insertions(+), 5 deletions(-) diff --git a/git-send-email.perl b/git-send-email.perl index 5210a40..c052760 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+