HomePhabricator

Let PhutilEmailAddress encode addresses with complex display names somewhat…

Description

Let PhutilEmailAddress encode addresses with complex display names somewhat properly

Summary:
Ref T13053. This is intended to replace the incomplete fix in D17831, which stopped some bleeding but is not correct for all inputs.

This mostly appears to implement the rules in RFC2822, which don't seem exceptionally complex from the escaping side, even though it is well established that no computer can ever successfully parse an RFC2822 address.

Test Plan: Added unit tests; ran unit tests.

Maniphest Tasks: T13053

Differential Revision: https://secure.phabricator.com/D19026

Details