[wp-trac] Re: [WordPress Trac] #2691: HTML comments in posts aren't handled properly.

WordPress Trac wp-trac at lists.automattic.com
Tue Apr 25 10:52:43 GMT 2006


#2691: HTML comments in posts aren't handled properly.
-----------------------+----------------------------------------------------
       Id:  2691       |      Status:  new                     
Component:  General    |    Modified:  Tue Apr 25 10:52:43 2006
 Severity:  normal     |   Milestone:                          
 Priority:  normal     |     Version:  2.0                     
    Owner:  anonymous  |    Reporter:  gord                    
-----------------------+----------------------------------------------------
Comment (by random):

 Maybe a bandaid on it? (e.g.)
 {{{
 $pee = preg_replace('!<p><!--(.*?)--></p>!ise', " '<!--' .
 stripslashes(clean_pre('$1'))  . '-->' ", $pee);
 }}}
 clean_pre() will ruin any comments which are ''supposed'' to have <p> and
 <br /> in them, but that's an even edgier case.

 Gord, you could also try a plugin replacement for wpautop -- I know
 Markdown handles comments fine.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/2691>
WordPress Trac <http://wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list