Message416891
It seems that `email.utils.formataddr` and `email.utils.parseaddr` are not directly inverse from each other, because `formataddr` does not respect double spaces within the "realname" section.
For example:
```
from email.utils import formataddr, parseaddr
identity = '"foo bar" <foo@example.com>'
print(formataddr(parseaddr(identity)))
# 'foo bar <foo@example.com>'
print(formataddr(parseaddr(formataddr(parseaddr(identity)))))
# 'foo bar <foo@example.com>'
```
The first round trip strips the quotes, and the second round trip strips the double space in the "realname" section.
The utility function only seems to check for special characters, but it should also check for double spaces. |
|
Date |
User |
Action |
Args |
2022-04-06 17:45:12 | AlecRosenbaum | set | recipients:
+ AlecRosenbaum, barry, r.david.murray |
2022-04-06 17:45:12 | AlecRosenbaum | set | messageid: <1649267112.95.0.680497304101.issue47244@roundup.psfhosted.org> |
2022-04-06 17:45:12 | AlecRosenbaum | link | issue47244 messages |
2022-04-06 17:45:12 | AlecRosenbaum | create | |
|