diff --git a/include/fonctions.inc.php b/include/fonctions.inc.php index e1fc1b6..86edc74 100644 --- a/include/fonctions.inc.php +++ b/include/fonctions.inc.php @@ -104,7 +104,7 @@ function replaceVariables($db, $text, $dico) :array $var = substr($text, $posVar+1, $posEsp-$posVar-1); } $posVar = $posEsp+1; - $var = trim($var, " .\n\r"); + $var = trim($var, " .\n\r)"); $varReplace = "$" . $var; if ( isset ($variables[$var]) ) @@ -124,7 +124,7 @@ function replaceVariables($db, $text, $dico) :array { $varText = '' . $varText . ""; } - $text = str_replace($varReplace, $varText, $text); + $text = str_replace($varReplace, $varText, $text); //remplace la variable dans le texte }else { break; }