[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 May 2 15:46:48 GMT 2008


#6877: preg_replace in wpautop deletes all the text in the post
-----------------------------------------+----------------------------------
 Reporter:  duncanmc                     |        Owner:  anonymous
     Type:  defect                       |       Status:  new      
 Priority:  highest omg bbq              |    Milestone:  2.5.2    
Component:  Administration               |      Version:  2.5.1    
 Severity:  critical                     |   Resolution:           
 Keywords:  reporter-feedback , wpautop  |  
-----------------------------------------+----------------------------------
Comment (by duncanmc):

 Content is properly saved in the database. The problem occurs when
 displaying the content on the page.
 It is not related to plugins. I wrote echo($pee) to see the content of pee
 variable just before that preg_replace and also just after doing that
 preg_replace. When the code is executed, first echo before that
 preg_replace shows that pee has all the content, properly. However right
 after executing the line $pee = preg_replace('/\n?(.+?)(?:\n\s*\n|\z)/s',
 "<p>$1</p>\n", $pee);  the pee variable becomes empty! It does not occur
 on all long posts.

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


More information about the wp-trac mailing list