[SPIP] v3.0.22-->v3.0.24
[lhc/web/www.git] / www / ecrire / inc / rechercher.php
index 3e36105..f5ecc4b 100644 (file)
@@ -72,7 +72,7 @@ function expression_recherche($recherche, $options) {
        $recherche = trim($recherche);
 
        $is_preg = false;
-       if (substr($recherche,0,1)=='/' AND substr($recherche,-1,1)=='/'){
+       if (substr($recherche, 0, 1) == '/' and substr($recherche, -1, 1) == '/' and strlen($recherche) > 2) {
                // c'est une preg
                $recherche_trans = translitteration($recherche);
                $preg = $recherche_trans.$options['preg_flags'];