You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
net/mail: correctly handle whitespaces when formatting an email address
Whitespace characters are allowed in quoted-string according to RFC 5322 without
being "Q"-encoding. Address.String() already always formats the name portion in
quoted string, so whitespace characters should be allowed in there.
Currently, http://play.golang.org/p/wQGqBhvbXL produces
=?utf-8?q?First_Last?= <foo@bar.org>
but it contains no non-ASCII characters, so it should format to
"First Last" <foo@bar.org>
https://golang.org/cl/15380044/
The text was updated successfully, but these errors were encountered:
I also wanted to report this bug. According to RFC 5322 email address should follow
these rules:
name-addr = [display-name] angle-addr
display-name = phrase
phrase = 1*word / obs-phrase
word = atom / quoted-string
atom = [CFWS] 1*atext [CFWS]
So a phrase of (printable ascii) words separated by whitespace is also allowed.
The text was updated successfully, but these errors were encountered: