X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Fcompose.php;h=752aa3cfb04e424172deecbd554d39bfdd724b8b;hb=42f2eadfbdc4a3b8144b5dae28194a71780790c2;hp=e8518b21cb753b31c51d36ca07fa1ef624f02e2e;hpb=92c6f757182ab746586074a9e8c4146675a02ebc;p=squirrelmail.git diff --git a/src/compose.php b/src/compose.php index e8518b21..752aa3cf 100644 --- a/src/compose.php +++ b/src/compose.php @@ -73,7 +73,7 @@ sqgetGlobalVar('draft_id',$draft_id); sqgetGlobalVar('ent_num',$ent_num); sqgetGlobalVar('saved_draft',$saved_draft); sqgetGlobalVar('delete_draft',$delete_draft); -sqgetGlobalVar('startmessage',$startMessage); +sqgetGlobalVar('startMessage',$startMessage); /** POST VARS */ sqgetGlobalVar('sigappend', $sigappend, SQ_POST); @@ -128,6 +128,11 @@ function replyAllString($header) { $url_replytoallcc = ''; foreach( $url_replytoall_ar as $email => $personal) { if ($personal) { + // if personal name contains address separator then surround + // the personal name with double quotes. + if (strpos($personal,',') !== false) { + $personal = '"'.$personal.'"'; + } $url_replytoallcc .= ", $personal <$email>"; } else { $url_replytoallcc .= ', '. $email; @@ -557,7 +562,7 @@ function newMail ($mailbox='', $passed_id='', $passed_ent_id='', $action='', $se $use_signature, $composesession, $data_dir, $username, $username, $key, $imapServerAddress, $imapPort, $compose_messages, $composeMessage; - global $languages, $squirrelmail_language; + global $languages, $squirrelmail_language, $default_charset; $send_to = $send_to_cc = $send_to_bcc = $subject = $identity = ''; $mailprio = 3; @@ -614,6 +619,17 @@ function newMail ($mailbox='', $passed_id='', $passed_ent_id='', $action='', $se $bodypart = $languages[$squirrelmail_language]['XTRA_CODE']('decode', $bodypart); } } + + if (isset($body_part_entity->header->parameters['charset'])) { + $actual = $body_part_entity->header->parameters['charset']; + } else { + $actual = 'us-ascii'; + } + + if ( $actual && is_conversion_safe($actual) && $actual != $default_charset){ + $bodypart = charset_decode($actual,$bodypart); + } + $body .= $bodypart; } if ($default_use_priority) { @@ -990,13 +1006,13 @@ function showInputForm ($session, $values=false) { if ($compose_new_win == '1') { echo ' ' . "\n" . ' ' . "\n" . - '