[wp-trac] [WordPress Trac] #43100: Unexpected results from wpautop

WordPress Trac noreply at wordpress.org
Tue Jan 23 17:48:37 UTC 2018


#43100: Unexpected results from wpautop
--------------------------+------------------------------
 Reporter:  pross         |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  General       |     Version:  trunk
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------

Comment (by wiselyfoolish):

 yup this affects empty paragraphs only.

 Current workaround solution is to strip empty paragraph tags from the text
 before running it through wpautop()

 Example:

 {{{#!php
 <?php
 $text = '<p>First paragraph</p><p></p><p>Second Actual Paragraph</p>';
 $text = preg_replace('@<p.*?></p>@', '', $text);
 $text = wpautop($text);
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/43100#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list