/***************************************************************************\
* SPIP, Systeme de publication pour l'internet *
* *
- * Copyright (c) 2001-2014 *
+ * Copyright (c) 2001-2016 *
* Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James *
* *
* Ce programme est un logiciel libre distribue sous licence GNU/GPL. *
$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'];