[buddypress-trac] [BuddyPress Trac] #7706: Using nl2br for Email content adds unwanted br tags

buddypress-trac noreply at wordpress.org
Wed Feb 28 12:36:12 UTC 2018


#7706: Using nl2br for Email content adds unwanted br tags
--------------------------+-----------------------------
 Reporter:  chherbst      |      Owner:  DJPaul
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Emails        |    Version:
 Severity:  normal        |   Keywords:
--------------------------+-----------------------------
 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 e.g.
 <tr> and <td> tags 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
 and thus an unusual bog amount of white space.

 The attached patch uses the wordpress function wpautop instead of nl2br
 which replaces newlines with paragraphs and does not replace newlines
 inside HTML tags.

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/7706>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list