[wp-trac] [WordPress Trac] #11482: Add LIKE to meta_compare

WordPress Trac wp-trac at lists.automattic.com
Fri Dec 18 19:43:03 UTC 2009


#11482: Add LIKE to meta_compare
-------------------------+--------------------------------------------------
 Reporter:  joehoyle     |       Owner:  ryan     
     Type:  enhancement  |      Status:  new      
 Priority:  normal       |   Milestone:  3.0      
Component:  Query        |     Version:  2.9      
 Severity:  normal       |    Keywords:  has-patch
-------------------------+--------------------------------------------------

Comment(by Denis-de-Bernardy):

 Replying to [comment:6 joehoyle]:

 you're welcome.

 > Even so, not included LIKE in meta_compare on the grounds that there is
 currently no function to easily sanitize the string seems wrong.

 sure. basically, what's needed is to make sure than LIKE and NOT LIKE
 properly handle comparisons that include \_ or \% in the url. these would
 catch literal _ and % in strings without being treated as wildcards. Since
 we're using single quotes, the \ might need to be double-escaped to work
 (i.e. \\\\).

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/11482#comment:7>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list