From 0cb9cc22136de2480351ff752ceed7922316f343 Mon Sep 17 00:00:00 2001 From: Jean-Pierre Morfin Date: Thu, 12 Nov 2015 09:24:04 +0100 Subject: [PATCH] Correct pattern to match all odt var tags some vars like {object_total_vat_local_x.y} or {object_total_vat_local_x,y} could not be tested to know if they were existing with [!-- IF {xxx} --] syntax --- htdocs/includes/odtphp/odf.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/includes/odtphp/odf.php b/htdocs/includes/odtphp/odf.php index 0bc54416fd1..52750352afa 100644 --- a/htdocs/includes/odtphp/odf.php +++ b/htdocs/includes/odtphp/odf.php @@ -284,7 +284,7 @@ IMG; private function _parse($type='content') { // Search all tags fou into condition to complete $this->vars, so we will proceed all tests even if not defined - $reg='@\[!--\sIF\s([{}a-zA-Z_]+)\s--\]@smU'; + $reg='@\[!--\sIF\s([{}a-zA-Z0-9\.\,_]+)\s--\]@smU'; preg_match_all($reg, $this->contentXml, $matches, PREG_SET_ORDER); //var_dump($this->vars);exit; foreach($matches as $match) // For each match, if there is no entry into this->vars, we add it