From 480b84a77f27daa312081bd65287311f91a02e93 Mon Sep 17 00:00:00 2001 From: stekkel Date: Sat, 1 Mar 2003 22:07:10 +0000 Subject: [PATCH] No decodeHeader inside the form because we already did that because we had to add Re Fwd information. So the lesson is: NEVER use double decodeHeader!!! git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@4576 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- src/compose.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/compose.php b/src/compose.php index ea74ff99..d1ebff50 100644 --- a/src/compose.php +++ b/src/compose.php @@ -623,8 +623,7 @@ function newMail ($mailbox='', $passed_id='', $passed_ent_id='', $action='', $se $send_to = $orig_header->getAddr_s('to'); $send_to_cc = $orig_header->getAddr_s('cc'); $send_to_bcc = $orig_header->getAddr_s('bcc'); - $subject = $orig_header->subject; - + $subject = decodeHeader($orig_header->subject,true,false); $body_ary = explode("\n", $body); $cnt = count($body_ary) ; $body = ''; @@ -642,7 +641,7 @@ function newMail ($mailbox='', $passed_id='', $passed_ent_id='', $action='', $se $send_to = $orig_header->getAddr_s('to'); $send_to_cc = $orig_header->getAddr_s('cc'); $send_to_bcc = $orig_header->getAddr_s('bcc'); - $subject = $orig_header->subject; + $subject = decodeHeader($orig_header->subject,true,false); $mailprio = $orig_header->priority; $orig_from = ''; $composeMessage = getAttachments($message, $composeMessage, $passed_id, $entities, $imapConnection); @@ -651,7 +650,7 @@ function newMail ($mailbox='', $passed_id='', $passed_ent_id='', $action='', $se case ('forward'): $send_to = ''; $subject = decodeHeader($orig_header->subject,true,false); - if ((substr(strtolower($subject), 0, 4) != 'fwd:') && + if ((substr(strtolower($subject), 0, 4) != 'fwd:') && (substr(strtolower($subject), 0, 5) != '[fwd:') && (substr(strtolower($subject), 0, 6) != '[ fwd:')) { $subject = '[Fwd: ' . $subject . ']'; @@ -676,7 +675,7 @@ function newMail ($mailbox='', $passed_id='', $passed_ent_id='', $action='', $se } else { $send_to = $orig_header->getAddr_s('from'); } - $subject = $orig_header->subject; + $subject = decodeHeader($orig_header->subject,true,false); $subject = str_replace('"', "'", $subject); $subject = trim($subject); if (substr(strtolower($subject), 0, 3) != 're:') { @@ -934,7 +933,7 @@ function showInputForm ($session, $values=false) { _("Subject:") . '' . "\n" . html_tag( 'td', '', 'left', $color[4] ) . "\n"; echo ' ' . "\n" . + $subject . '">' . "\n" . ' ' . "\n" . ' ' . "\n\n"; -- 2.25.1