author | Jeff King <peff@peff.net> | |
Fri, 8 Apr 2011 22:40:36 +0000 (18:40 -0400) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 26 Apr 2011 22:07:02 +0000 (15:07 -0700) | ||
commit | 4d03c18a3ea18138c24d379ccc25e219a36ca1ef | |
tree | 67b3785d209821d96dfe4e796eb88a714007d90d | tree | snapshot |
parent | 4fec83045bdc53ed9d3ff71ed099e3e6992b5c56 | commit | diff |
pretty: quote rfc822 specials in email addresses
If somebody has a name that includes an rfc822 special, we
will output it literally in the "From:" header. This is
usually OK, but certain characters (like ".") are supposed
to be enclosed in double-quotes in a mail header.
In practice, whether this matters may depend on your MUA.
Some MUAs will happily take in:
From: Foo B. Bar <author@example.com>
without quotes, and properly quote the "." when they send
the actual mail. Others may not, or may screw up harder
things like:
From: Foo "The Baz" Bar <author@example.com>
For example, mutt will strip the quotes, thinking they are
actual syntactic rfc822 quotes.
So let's quote properly, and then (if necessary) we still
apply rfc2047 encoding on top of that, which should make all
MUAs happy.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
If somebody has a name that includes an rfc822 special, we
will output it literally in the "From:" header. This is
usually OK, but certain characters (like ".") are supposed
to be enclosed in double-quotes in a mail header.
In practice, whether this matters may depend on your MUA.
Some MUAs will happily take in:
From: Foo B. Bar <author@example.com>
without quotes, and properly quote the "." when they send
the actual mail. Others may not, or may screw up harder
things like:
From: Foo "The Baz" Bar <author@example.com>
For example, mutt will strip the quotes, thinking they are
actual syntactic rfc822 quotes.
So let's quote properly, and then (if necessary) we still
apply rfc2047 encoding on top of that, which should make all
MUAs happy.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
pretty.c | diff | blob | history | |
t/t4014-format-patch.sh | diff | blob | history |