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

WordPress Trac noreply at wordpress.org
Sat Feb 9 02:57:49 UTC 2019


#45495: Extra P tags added to custom dynamic blocks
--------------------------+------------------------------
 Reporter:  mattheu       |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Editor        |     Version:
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------

Comment (by aldavigdis):

 This has been causing me massive headaches and I think I just found the
 cure.

 This issue seems to have been introduced in {{{blocks.php}}}
 https://core.trac.wordpress.org/changeset/44261 just before Christmas 2018
 and the change introduced to {{{do_blocks}}} in that case is the addition
 of {{{render_block}}}.

 This seems to have prevented {{{remove_filter}}} from being executed at
 the correct moment.

 ----


 Moving the {{{remove_filter}}} and {{{add_filter}}} statements to just
 before the {{{return}}} statement seems to have cured this issue on my
 side and blocks are not forced to include extra {{{p}}} or {{{br}}}
 elements.

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


More information about the wp-trac mailing list