[wp-trac] [WordPress Trac] #38656: wpautop incorrectly handling paragraphs within block elements

WordPress Trac noreply at wordpress.org
Sun Nov 6 12:46:32 UTC 2016


#38656: wpautop incorrectly handling paragraphs within block elements
-------------------------------------------------+-------------------------
 Reporter:  pento                                |       Owner:
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  Future
Component:  Formatting                           |  Release
 Severity:  normal                               |     Version:
 Keywords:  has-patch needs-unit-tests needs-    |  Resolution:
  testing                                        |     Focuses:
-------------------------------------------------+-------------------------

Comment (by pento):

 [attachment:38656.3.diff] adds code comments, and some more complex tests.

 There's probably value in adding some intelligence to the closing HTML tag
 detection, so we can handle some basic invalid HTML. For example, a
 browser will automatically correct `<div><span>foo</div>`, and treat it as
 `<div><span>foo</span></div>`, but `wpautop()` will get `$peeable` out of
 sync, causing problems.

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


More information about the wp-trac mailing list