WordPress.org

Make WordPress Core

Ticket #10041: 10041.2.diff

File 10041.2.diff, 436 bytes (added by Denis-de-Bernardy, 12 years ago)
  • wp-includes/formatting.php

     
    23292329 * @return string text, safe for inclusion in LIKE query.
    23302330 */
    23312331function like_escape($text) {
    2332         return str_replace(array("%", "_"), array("\\%", "\\_"), $text);
     2332        return esc_sql(addcslashes($text, '\\_%'));
    23332333}
    23342334
    23352335/**