1
0
Fork 0
mirror of https://git.sr.ht/~rjarry/aerc synced 2025-02-22 14:53:57 +01:00
aerc/lib/format
Robin Jarry f204c73675 compose,viewer: do not always wrap people names in quotes
Currently, names of recipients in From, To, Cc and Bcc headers are
(almost) always wrapped in quotes. Even if they are pure ASCII and
contain one upper case letter. E.g.:

	From: "Foo" <foo@baz.org>

There is no valid reason to add these quotes unless the name contains
special characters as specified by RFC 5322, section 3.2.3:

   specials        =   "(" / ")" /        ; Special characters that do
                       "<" / ">" /        ;  not appear in atext
                       "[" / "]" /
                       ":" / ";" /
                       "@" / "\" /
                       "," / "." /
                       DQUOTE

Adapt the check accordingly.

Link: https://datatracker.ietf.org/doc/html/rfc5322#section-3.2.3
Signed-off-by: Robin Jarry <robin@jarry.cc>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
2024-04-13 22:37:22 +02:00
..
format.go compose,viewer: do not always wrap people names in quotes 2024-04-13 22:37:22 +02:00