From 62fe840d493261fa621b2856b3322188419ebd3e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 10 May 2011 20:42:21 +0000 Subject: [PATCH] Fix: Accept + into phone number --- htdocs/lib/functions.lib.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/lib/functions.lib.php b/htdocs/lib/functions.lib.php index b5117b2b505..b370632f6d4 100644 --- a/htdocs/lib/functions.lib.php +++ b/htdocs/lib/functions.lib.php @@ -1041,10 +1041,10 @@ function dol_print_phone($phone,$country="FR",$cid=0,$socid=0,$addlink=0,$separ= // This line is for backward compatibility $url = sprintf($urlmask, urlencode($phone), urlencode($user->clicktodial_poste), urlencode($user->clicktodial_login), urlencode($user->clicktodial_password)); // Thoose lines are for substitution - $substitarray=array('__PHONEFROM__'=>$user->clicktodial_poste, - '__PHONETO__'=>$phone, - '__LOGIN__'=>$user->clicktodial_login, - '__PASS__'=>$user->clicktodial_password); + $substitarray=array('__PHONEFROM__'=>urlencode($user->clicktodial_poste), + '__PHONETO__'=>urlencode($phone), + '__LOGIN__'=>urlencode($user->clicktodial_login), + '__PASS__'=>urlencode($user->clicktodial_password)); $url = make_substitutions($url, $substitarray, $langs); $newphonesav=$newphone; $newphone ='