X-Git-Url: http://git.harvie.cz/?a=blobdiff_plain;f=wwwroot%2Fsmarty%2Flibs%2Fplugins%2Ffunction.mailto.php;h=20e9ed984992712b1e683122fef9fd23cb5d2304;hb=6cfa89c1d31d80113ea9e59580bbd9740ddf2e4e;hp=292c96631887f373fc27a32c2004620bd9921cd0;hpb=e034221efbc7970ec58be22d7517fd3c503dc903;p=mirrors%2FKyberia-bloodline.git diff --git a/wwwroot/smarty/libs/plugins/function.mailto.php b/wwwroot/smarty/libs/plugins/function.mailto.php index 292c966..20e9ed9 100644 --- a/wwwroot/smarty/libs/plugins/function.mailto.php +++ b/wwwroot/smarty/libs/plugins/function.mailto.php @@ -62,6 +62,8 @@ function smarty_function_mailto($params, &$smarty) // netscape and mozilla do not decode %40 (@) in BCC field (bug?) // so, don't encode it. + $search = array('%40', '%2C'); + $replace = array('@', ','); $mail_parms = array(); foreach ($params as $var=>$value) { switch ($var) { @@ -69,9 +71,9 @@ function smarty_function_mailto($params, &$smarty) case 'bcc': case 'followupto': if (!empty($value)) - $mail_parms[] = $var.'='.str_replace('%40','@',rawurlencode($value)); + $mail_parms[] = $var.'='.str_replace($search,$replace,rawurlencode($value)); break; - + case 'subject': case 'newsgroups': $mail_parms[] = $var.'='.rawurlencode($value); @@ -112,7 +114,7 @@ function smarty_function_mailto($params, &$smarty) $string = ''.$text.''; for($x = 0, $y = strlen($string); $x < $y; $x++ ) { - $ord[] = ord($string[$x]); + $ord[] = ord($string[$x]); } $_ret = "\n"; - + return $_ret; - - + + } elseif ($encode == 'hex') { preg_match('!^(.*)(\?.*)$!',$address,$match);