* Escape backslashes before normal escaping, to not counteract the effect
[lhc/web/wiklou.git] / includes / db / Database.php
index 586baee..798dc7d 100644 (file)
@@ -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;
        }