send-email: ensure quoted addresses are rfc2047 encoded
authorJay Soffian <jaysoffian@gmail.com>
Tue, 31 Mar 2009 16:22:14 +0000 (12:22 -0400)
committerJunio C Hamano <gitster@pobox.com>
Thu, 2 Apr 2009 17:46:21 +0000 (10:46 -0700)
sanitize_address assumes that quoted addresses (e.g., "first last"
<first.last@example.com) do not need rfc2047 encoding, but this is
not always the case.

For example, various places in send-email extract addresses using
parse_address_line. parse_address_line returns the addresses already
quoted (e.g., "first last" <first.last@example.com), but not rfc2047
encoded.

This patch makes sanitize_address stricter about what needs rfc2047
encoding and adds a test demonstrating where I noticed the problem.

Signed-off-by: Jay Soffian <jaysoffian@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
No differences found