X-Git-Url: https://git.harvie.cz/?a=blobdiff_plain;f=wwwroot%2Fsmarty%2Flibs%2Fplugins%2Ffunction.mailto.php;h=20e9ed984992712b1e683122fef9fd23cb5d2304;hb=9b7c11be09e7a553b26667f673c6315209ddc210;hp=292c96631887f373fc27a32c2004620bd9921cd0;hpb=95a6ccc277bc41d750ced09fe5a1a779bde342c7;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);