Improve like_escape to also escape '\'. Fixes #10041 props miau_jp and Denis-de-Bernardy.
git-svn-id: https://develop.svn.wordpress.org/trunk@12460 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
f0a6bb378b
commit
3081afd1e1
|
@ -2410,7 +2410,7 @@ function tag_escape($tag_name) {
|
|||
* @return string text, safe for inclusion in LIKE query.
|
||||
*/
|
||||
function like_escape($text) {
|
||||
return str_replace(array("%", "_"), array("\\%", "\\_"), $text);
|
||||
return addcslashes($text, '\\%_');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue