svncommit
2006-07-31 abb32edbeb0e4c9be7b38c4162bd8c7cbd06dc74
#1399714 - fixed commas in identity fullname field


1 files modified
5 ■■■■■ changed files
program/steps/mail/sendmail.inc 5 ●●●●● patch | view | raw | blame | history
program/steps/mail/sendmail.inc
@@ -53,8 +53,9 @@
    {
    $sql_arr = $DB->fetch_assoc($sql_result);
    $out = $sql_arr;
    $name = strpos($sql_arr['name'], ",") ? '"'.$sql_arr['name'].'"' : $sql_arr['name'];
    $out['string'] = sprintf('%s <%s>',
                             rcube_charset_convert($sql_arr['name'], $CHARSET, $OUTPUT->get_charset()),
                             rcube_charset_convert($name, $CHARSET, $OUTPUT->get_charset()),
                             $sql_arr['mailto']);
    return $out;
    }
@@ -87,7 +88,7 @@
$mailto_regexp = array('/[,;]\s*[\r\n]+/', '/[\r\n]+/', '/[,;]\s*$/m');
$mailto_replace = array(', ', ', ', '');
// repalce new lines and strip ending ', '
// replace new lines and strip ending ', '
$mailto = preg_replace($mailto_regexp, $mailto_replace, get_input_value('_to', RCUBE_INPUT_POST, TRUE, $message_charset));
// decode address strings