From 5b67ba9b86541ecaf21661d565b32d4a23805c53 Mon Sep 17 00:00:00 2001 From: Matthieu Marcillaud <marcimat@rezo.net> Date: Sat, 11 Feb 2017 14:44:24 +0000 Subject: [PATCH] =?UTF-8?q?Ticket=20#3768=20:=20Autoriser=20les=20recherch?= =?UTF-8?q?es=20qui=20utilisent=20un=20/=20(ce=20/=20=C3=A9tant=20utilis?= =?UTF-8?q?=C3=A9=20comme=20d=C3=A9limiteur=20pour=20la=20regexp=20faisait?= =?UTF-8?q?=20planter).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ecrire/inc/rechercher.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ecrire/inc/rechercher.php b/ecrire/inc/rechercher.php index 1ea1e13149..5327c42b75 100644 --- a/ecrire/inc/rechercher.php +++ b/ecrire/inc/rechercher.php @@ -141,7 +141,7 @@ function expression_recherche($recherche, $options) { $q = str_replace(array('%', '_'), array('\%', '\_'), trim($recherche)); // eviter les parentheses et autres caractères qui interferent avec pcre par la suite (dans le preg_match_all) s'il y a des reponses - $recherche = preg_quote($recherche); + $recherche = preg_quote($recherche, '/'); $recherche_trans = translitteration($recherche); $recherche_mod = $recherche_trans; @@ -170,7 +170,6 @@ function expression_recherche($recherche, $options) { ); $preg = '/' . preg_replace(",\s+," . $u, ".+", trim($recherche_mod)) . '/' . $options['preg_flags']; - } else { $methode = 'REGEXP'; $q = sql_quote(trim($recherche, '/')); -- GitLab