[wp-trac] [WordPress Trac] #45495: Extra P tags added to custom dynamic blocks

WordPress Trac noreply at wordpress.org
Mon Apr 8 06:53:21 UTC 2019

#45495: Extra P tags added to custom dynamic blocks
 Reporter:  mattheu                                 |       Owner:  pento
     Type:  defect (bug)                            |      Status:  closed
 Priority:  normal                                  |   Milestone:  5.2
Component:  Editor                                  |     Version:
 Severity:  normal                                  |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests needs-testing  |     Focuses:
Changes (by pento):

 * owner:  (none) => pento
 * status:  new => closed
 * resolution:   => fixed


 In [changeset:"45139" 45139]:
 #!CommitTicketReference repository="" revision="45139"
 Blocks: Allow for nested `the_content` calls within `do_blocks()`.

 When `do_blocks()` is run, it sets up some special handling of the
 `wpautop` filter, as we don't want `wpautop` to run on block content, but
 we do want it to be available for subsequent runs of `the_content`, which
 may be happening on non-block content.

 As we set this up before rendering dynamic blocks, however, a dynamic
 block choosing to run `the_content` will cause unintentially structural
 deficiences in this particular recursive block tower.

 Moving this handling to after dynamic blocks are rendered makes our tower
 lean a little less.

 Props aldavigdis, pento.
 Fixes #45495.

Ticket URL: <https://core.trac.wordpress.org/ticket/45495#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform

More information about the wp-trac mailing list