[wp-trac] Re: [WordPress Trac] #1376: Comment HTML cleaner mangles PHP open tag

WordPress Trac wp-trac at lists.automattic.com
Tue Jul 15 17:51:32 GMT 2008

#1376: Comment HTML cleaner mangles PHP open tag
 Reporter:  anonymousbugger  |        Owner:  anonymous
     Type:  defect           |       Status:  reopened 
 Priority:  normal           |    Milestone:           
Component:  General          |      Version:  1.5      
 Severity:  trivial          |   Resolution:           
 Keywords:                   |  
Changes (by everah):

  * status:  closed => reopened
  * version:  1.5.1 => 1.5
  * resolution:  wontfix =>


 I know this is an old bug, but this is still happening not only in
 comments but in regular posts/pages as well, even through 2.6. This is not
 an issue of executing PHP, it is an issue of being able to post code that
 others can copy and paste for use in their own applications.

 I have posted this issue to the forums before:



 And while I can always go and edit the post functions that handle the tag
 balancing, every time I update my installation of Wordpress my changes get
 wiped out. Is there a way that the core of Wordpress can be updated so
 that posting <?php tags does not create the space between the opening tag
 bracket and the question mark? This should be applied to PHP tags, Doctype
 declarations and XML opening tags since they do not have balance matched

 And for the record, Wordpress also mangles doctype declarations in posts
 as well (<!DOCTYPE).

 An example for you to view can be found here:


Ticket URL: <http://trac.wordpress.org/ticket/1376#comment:9>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software

More information about the wp-trac mailing list