[wp-trac] Re: [WordPress Trac] #7423: in WP_Query, sanitization breaks usage of multiple post_status values

WordPress Trac wp-trac at lists.automattic.com
Tue Jul 29 02:48:39 GMT 2008


#7423: in WP_Query, sanitization breaks usage of multiple post_status values
-------------------------+--------------------------------------------------
 Reporter:  markjaquith  |        Owner:  markjaquith
     Type:  defect       |       Status:  assigned   
 Priority:  high         |    Milestone:  2.7        
Component:  General      |      Version:  2.6        
 Severity:  normal       |   Resolution:             
 Keywords:               |  
-------------------------+--------------------------------------------------
Comment (by filosofo):

 Replying to [comment:3 azaozz]:
 > That may affect some plugins, but don't think plugins are allowed to
 change these. Otherwise will have to use exactly the same regexp as
 sanitize_user

 Actually, I use a custom post_type with some regularity, and the API makes
 it easy to do with {{{set_post_type()}}} and {{{get_post_type()}}}.

 My suggestion is that you do what {{{set_post_type()}}} does and use
 {{{sanitize_post_field()}}} to sanitize the values in the 'db' context.
 It applies the 'pre_post_type' filter callbacks, which by default is
 {{{sanitize_user}}}.

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


More information about the wp-trac mailing list