From: stekkel Date: Wed, 18 Jun 2003 16:23:48 +0000 (+0000) Subject: nonbreaking spaces are frustrating the address parser because they do not X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=b0a3a7384426be72bb1f7060b1edbe63fff65594;p=squirrelmail.git nonbreaking spaces are frustrating the address parser because they do not match with => replace them before we parse those addresses. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@5076 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/src/compose.php b/src/compose.php index 3c20980d..0afec44f 100644 --- a/src/compose.php +++ b/src/compose.php @@ -559,7 +559,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; $send_to = $send_to_cc = $send_to_bcc = $subject = $identity = ''; $mailprio = 3; @@ -694,7 +694,7 @@ function newMail ($mailbox='', $passed_id='', $passed_ent_id='', $action='', $se case ('forward'): $send_to = ''; $subject = decodeHeader($orig_header->subject,false,true); - 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 . ']'; @@ -1337,6 +1337,15 @@ function deliverMessage($composeMessage, $draft=false) { $domain, $action, $default_move_to_sent, $move_to_sent; global $imapServerAddress, $imapPort, $sent_folder, $key; + /* some browsers replace by nonbreaking spaces   + by replacing them back to spaces addressparsing works */ + /* FIXME: How to handle in case of other charsets where "\240" + is not a non breaking space ??? */ + + $send_to = str_replace("\240",' ',$send_to); + $send_to_cc = str_replace("\240",' ',$send_to_cc); + $send_to_bcc = str_replace("\240",' ',$send_to_bcc); + $rfc822_header = $composeMessage->rfc822_header; $abook = addressbook_init(false, true);