[wp-trac] Re: [WordPress Trac] #6877: preg_replace in wpautop deletes all the text in the post

WordPress Trac wp-trac at lists.automattic.com
Fri Jan 23 12:09:15 GMT 2009


#6877: preg_replace in wpautop deletes all the text in the post
----------------------------------------------------+-----------------------
 Reporter:  duncanmc                                |        Owner:  azaozz
     Type:  defect (bug)                            |       Status:  closed
 Priority:  highest omg bbq                         |    Milestone:  2.7.1 
Component:  Administration                          |      Version:  2.7   
 Severity:  critical                                |   Resolution:  fixed 
 Keywords:  reporter-feedback , wpautop, has_patch  |  
----------------------------------------------------+-----------------------
Changes (by Denis-de-Bernardy):

  * version:  2.5.1 => 2.7
  * milestone:  2.7 => 2.7.1

Comment:

 sorry for re-opening, but... the test text in #8553
 (http://www.misthaven.eu/test/text.txt) is related to this line in
 wpautop:

 {{{
 $pee = preg_replace('!<p>([^<]+)\s*?(</(?:div|address|form)[^>]*>)!',
 "<p>$1</p>$2", $pee);
 }}}

 upon commenting it out, things work as expected.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/6877#comment:18>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list