[wp-trac] Re: [WordPress Trac] #10041: like_escape() should escape backslashes too

WordPress Trac wp-trac at lists.automattic.com
Fri Jun 5 11:52:30 GMT 2009


#10041: like_escape() should escape backslashes too
--------------------------+-------------------------------------------------
 Reporter:  miau_jp       |       Owner:                   
     Type:  defect (bug)  |      Status:  new              
 Priority:  low           |   Milestone:  2.9              
Component:  Formatting    |     Version:  2.8              
 Severity:  minor         |    Keywords:  needs-patch early
--------------------------+-------------------------------------------------
Changes (by Denis-de-Bernardy):

  * keywords:  => needs-patch early
  * version:  => 2.8
  * milestone:  Unassigned => 2.9


Comment:

 Confirming...

 {{{
 mysql> select '\\' like '\\';
 +----------------+
 | '\\' like '\\' |
 +----------------+
 |              1 |
 +----------------+
 1 row in set (0.00 sec)

 mysql> select '\\' like '\\\\';
 +------------------+
 | '\\' like '\\\\' |
 +------------------+
 |                1 |
 +------------------+
 1 row in set (0.00 sec)

 mysql> select '\\' like '\\%';
 +-----------------+
 | '\\' like '\\%' |
 +-----------------+
 |               0 |
 +-----------------+
 1 row in set (0.00 sec)

 mysql> select '\\' like '\\\\%';
 +-------------------+
 | '\\' like '\\\\%' |
 +-------------------+
 |                 1 |
 +-------------------+
 1 row in set (0.00 sec)

 }}}

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


More information about the wp-trac mailing list