Page MenuHomePhabricator

Respect "" when building mail HTML bodies

Authored by epriestley on Jun 12 2018, 5:01 PM.



Ref T13151. See T11767. See PHI686. Although we limit outbound mail text bodies, the limit doesn't currently apply to attachments, HTML bodies, or headers. T11767 discusses improving this in the general case.

In the wild, an install hit an issue (see PHI686) where edits to Phriction pages generate very large HTML bodies. Check and respect the limit when building HTML bodies.

If we don't have enough room for the HTML body, we just drop it. We have the text body to fall back to, and HTML is difficult to truncate safely.

Test Plan

Added unit tests and made them pass.

Diff Detail

rP Phabricator
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

epriestley created this revision.Jun 12 2018, 5:01 PM
epriestley requested review of this revision.Jun 12 2018, 5:02 PM
amckinley accepted this revision.Jun 12 2018, 5:53 PM
This revision is now accepted and ready to land.Jun 12 2018, 5:53 PM
This revision was automatically updated to reflect the committed changes.