From 3e1655761faad889a41e11afe8f4c009b10e1d06 Mon Sep 17 00:00:00 2001 From: "Committo,Ergo:sum" <esj@rezo.net> Date: Tue, 4 Jan 2005 00:13:10 +0000 Subject: [PATCH] =?UTF-8?q?ne=20pas=20consid=C3=A9rer=20comme=20un=20champ?= =?UTF-8?q?=20#MAJUSCULES=20suivi=20de=20chiffre=20ou=20de=20minuscules?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- inc-html-squel.php3 | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/inc-html-squel.php3 b/inc-html-squel.php3 index d78e5620d9..9cb90a5dcb 100644 --- a/inc-html-squel.php3 +++ b/inc-html-squel.php3 @@ -65,9 +65,11 @@ function parser_inclure($texte) { } function parser_champs($texte) { - $result=Array(); + $result = array(); while (ereg(NOM_DE_CHAMP . '(.*)$', $texte, $regs)) { - $p = strpos($texte, $regs[0]); + $p = strpos($texte, $regs[0]); + + if ($regs[4] || !ereg("[0-9a-z]", $regs[5][0])) { if ($p) { $champ = new Texte; $champ->texte = (substr($texte, 0, $p)); @@ -80,8 +82,16 @@ function parser_champs($texte) { $champ->etoile = $regs[4]; $texte = $regs[5]; $result[] = $champ; + } else { + // faux champ + $champ = new Texte; + $champ->texte = (substr($texte, 0, $p+1)); + $result[] = $champ; + $texte = (substr($texte, $p+1)); + } } if ($texte) { + $champ = new Texte; $champ->texte = $texte; $result[] = $champ; -- GitLab