From 64c295e4ac1e1985fa222fe8a240603054110c76 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Niklas=20Laxstr=C3=B6m?= Date: Mon, 26 Jan 2009 21:00:21 +0000 Subject: [PATCH] * Escape backslashes before normal escaping, to not counteract the effect --- includes/db/Database.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/db/Database.php b/includes/db/Database.php index 586baee4bc..798dc7d369 100644 --- a/includes/db/Database.php +++ b/includes/db/Database.php @@ -1620,8 +1620,9 @@ class Database { * Escape string for safe LIKE usage */ function escapeLike( $s ) { + $s=str_replace('\\','\\\\',$s); $s=$this->strencode( $s ); - $s=str_replace(array('%','_','\\'),array('\%','\_','\\\\'),$s); + $s=str_replace(array('%','_'),array('\%','\_'),$s); return $s; } -- 2.20.1