[wp-trac] [WordPress Trac] #3494: Comments filtered for XHTML validity multiple times

WordPress Trac wp-trac at lists.automattic.com
Sat Dec 23 07:33:21 GMT 2006


#3494: Comments filtered for XHTML validity multiple times
--------------------------+-------------------------------------------------
 Reporter:  markjaquith   |       Owner:  anonymous
     Type:  enhancement   |      Status:  new      
 Priority:  normal        |   Milestone:  2.2      
Component:  Optimization  |     Version:  2.1      
 Severity:  normal        |    Keywords:           
--------------------------+-------------------------------------------------
 #2714 introduced comment_text() XHTML validity forcing.

 Now, if the balanceTags option is on, WP is filtering comments on their
 way into the database as well as on the way out.  pre_comment_content and
 comment_save_pre both run the comment content through balanceTags().

 I think that comments, as third-party data whose XHTML invalidity can ruin
 your blog or your WP admin, should always be filtered for XHTML validity.

 The best solution IMO would be to have comments always XHTML filtered on
 the way into the database (that is, run force_balance_tags() on
 pre_comment_content and comment_save_pre and remove the call to
 force_balance_tags() on comment_text() )

 That's how content is filtered, and that'd be the least processor
 intensive.

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


More information about the wp-trac mailing list