From 52190c250ea6c2443d6aa1364ba9d6910585e573 Mon Sep 17 00:00:00 2001 From: Vincent Calame Date: Fri, 3 Mar 2023 11:27:39 +0100 Subject: [PATCH] =?UTF-8?q?R=C3=A9tablissement=20du=20filtre=20scrutari?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- libreavous_fonctions.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libreavous_fonctions.php b/libreavous_fonctions.php index 0fe9713..2d5a85e 100644 --- a/libreavous_fonctions.php +++ b/libreavous_fonctions.php @@ -103,3 +103,10 @@ function libreavous_siextinf($chaine) { return $replace; } } + +//traite une chaine de recherche provenant d'un paramètre extérieur (q ou qid) +function filtre_scrutari_escape_query($texte) { + $texte = preg_replace('/[^-*":!()&|[:alnum:]]+/u', ' ', $texte); + $texte = trim(str_replace("\"", "\\\"", $texte)); + return $texte; +}