-
Committer:
djpaul
-
Date:
2018-03-07 12:27:57 UTC
-
Revision ID:
svn-v4:cdf35c40-ae34-48e0-9cc9-0c9da1808c22:trunk:11895
Emails: use `wpautop()` instead of `nl2br()` when rendering HTML email content.
When including markup in the email body, e.g. tables, these are usually saved by
the WordPress editor with newlines after each tag. These newlines get converted
by `nl2br()` to `<br>` tags. As `<br>` tags are not allowed between all elements,
e.g. `<tr>` and `<td>`, these get pulled in front of the table by most browsers
and email clients.
This leads to a lot of `<br>` tags in front of the table -- undesired whitespace.
Fixes #7706
Props chherbst