WordPress.org

Make WordPress Core


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.1/wp-includes/taxonomy.php

    r17527 r18021  
    12561256    }
    12571257
    1258     if ( !empty($name__like) )
    1259         $where .= " AND t.name LIKE '" . like_escape( $name__like ) . "%'";
     1258    if ( !empty($name__like) ) {
     1259        $name__like = like_escape( $name__like );
     1260        $where .= $wpdb->prepare( " AND t.name LIKE %s", $name__like . '%' );
     1261    }
    12601262
    12611263    if ( '' !== $parent ) {
     
    12791281    if ( !empty($search) ) {
    12801282        $search = like_escape($search);
    1281         $where .= " AND (t.name LIKE '%$search%')";
     1283        $where .= $wpdb->prepare( " AND (t.name LIKE %s)", '%' . $search . '%');
    12821284    }
    12831285
Note: See TracChangeset for help on using the changeset viewer.