WordPress.org

Make WordPress Core

Ticket #10041: 10041.diff

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

     
    22662266 * @return string text, safe for inclusion in LIKE query.
    22672267 */
    22682268function like_escape($text) {
    2269         return str_replace(array("%", "_"), array("\\%", "\\_"), $text);
     2269        return addcslashes($text, '%_');
    22702270}
    22712271
    22722272/**