From 49db9d13046baedabf889bd7d0105f0627972392 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 18 Sep 2014 17:12:51 +0200 Subject: [PATCH] Fix: Avoid explode when separator : is not. --- htdocs/core/lib/functions.lib.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 2e2bf34a75d..886e78730cc 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -1841,7 +1841,8 @@ function img_picto($titlealt, $picto, $options = '', $pictoisfullpath = false, $ if ($srconly) return $fullpathpicto; else { - $tmparray=explode(':',$titlealt); + $tmparray=array(0=>$titlealt); + if (preg_match('/:[^\s]/',$titlealt)) $tmparray=explode(':',$titlealt); // We explode if we have TextA:TextB. Not if we have TextA: TextB $title=$tmparray[0]; $alt=empty($tmparray[1])?'':$tmparray[1]; return ''.dol_escape_htmltag($alt).''; // Alt is used for accessibility, title for popup