From: Niklas Laxström Date: Mon, 26 Jan 2009 21:00:21 +0000 (+0000) Subject: * Escape backslashes before normal escaping, to not counteract the effect X-Git-Tag: 1.31.0-rc.0~43228 X-Git-Url: http://git.cyclocoop.org/%28%28?a=commitdiff_plain;h=64c295e4ac1e1985fa222fe8a240603054110c76;p=lhc%2Fweb%2Fwiklou.git * Escape backslashes before normal escaping, to not counteract the effect --- 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; }