[wp-trac] [WordPress Trac] #3833: Extra </p> inside blockquote

WordPress Trac noreply at wordpress.org
Thu Feb 9 15:47:39 UTC 2023


#3833: Extra </p> inside blockquote
-----------------------------------------+---------------------------------
 Reporter:  audwan                       |       Owner:  Archibald Leaurees
     Type:  defect (bug)                 |      Status:  reopened
 Priority:  normal                       |   Milestone:  Future Release
Component:  Formatting                   |     Version:  2.7
 Severity:  normal                       |  Resolution:
 Keywords:  wpautop needs-refresh close  |     Focuses:
-----------------------------------------+---------------------------------

Comment (by SergeyBiryukov):

 Replying to [comment:35 Mte90]:
 > Looking now the problem seems fixed
 > {{{#!php
 >       // If a <blockquote> is wrapped with a <p>, move it inside the
 <blockquote>.
 >       $text = preg_replace( '|<p><blockquote([^>]*)>|i',
 '<blockquote$1><p>', $text );
 >       $text = str_replace( '</blockquote></p>', '</p></blockquote>',
 $text );
 > }}}

 FWIW, these particular lines have been around since `wpautop()` was
 introduced in [13] for WordPress 0.71. They were moved around a bit in
 [106] and [333], and the comment was added in [31852].

 So if the issue can no longer be reproduced, it seems like it was fixed
 elsewhere.

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


More information about the wp-trac mailing list