Make WordPress Core

Changeset 12460


Ignore:
Timestamp:
12/19/2009 11:07:16 AM (15 years ago)
Author:
westi
Message:

Improve like_escape to also escape '\'. Fixes #10041 props miau_jp and Denis-de-Bernardy.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/formatting.php

    r12414 r12460  
    24112411 */
    24122412function like_escape($text) {
    2413     return str_replace(array("%", "_"), array("\\%", "\\_"), $text);
     2413    return addcslashes($text, '\\%_');
    24142414}
    24152415
Note: See TracChangeset for help on using the changeset viewer.