X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=src%2Fcompose.php;h=666326ad02952f664f9ab22db9ad27156baf1bbf;hp=e0a7ca74c0041f3a295689ce90cfd09658a7aa23;hb=162efb6f1107894ecf06936388ea3334c886bb83;hpb=8d8ab69aaf81e9fdd15396c783f0e40e698e839f diff --git a/src/compose.php b/src/compose.php index e0a7ca74..666326ad 100644 --- a/src/compose.php +++ b/src/compose.php @@ -33,6 +33,8 @@ include("../functions/display_messages.php"); if (!isset($auth_php)) include ("../functions/auth.php"); + if (!isset($plugin_php)) + include ("../functions/plugin.php"); include("../src/load_prefs.php"); @@ -41,8 +43,9 @@ global $forward_id, $imapConnection, $msg, $ent_num, $body_ary, $body, $reply_id, $send_to, $send_to_cc, $mailbox, $send_to_bcc; - $send_to = decodeHeader($send_to); - $send_to_cc = decodeHeader($send_to_cc); + $send_to = sqStripSlashes(decodeHeader($send_to)); + $send_to_cc = sqStripSlashes(decodeHeader($send_to_cc)); + $send_to_bcc = sqStripSlashes(decodeHeader($send_to_bcc)); if ($forward_id) $id = $forward_id; @@ -73,7 +76,7 @@ $body = ""; for ($i=0; $i < count($body_ary); $i++) { if ($i==0 && $forward_id) { - $tmp = _("-------- Original Message ---------\n"); + $tmp = "-------- " . _("Original Message") . " --------\n"; $tmp .= _("Subject") . ": " . $orig_header->subject . "\n"; $tmp .= " " . _("From") . ": " . $orig_header->from . "\n"; $tmp .= " " . _("To") . ": " . $orig_header->to[0] . "\n"; @@ -91,6 +94,7 @@ else $body = "$body> $tmp\n"; } + sqimap_mailbox_close($imapConnection); return $body; } @@ -98,11 +102,9 @@ $send_to = sqimap_find_email($send_to); } -// $send_to = ereg_replace("\"", "", $send_to); - $send_to = stripslashes($send_to); - /** This formats a CC string if they hit "reply all" **/ if ($send_to_cc != "") { + $send_to_cc = ereg_replace( '"[^"]*"', "", $send_to_cc); $send_to_cc = ereg_replace(";", ",", $send_to_cc); $sendcc = explode(",", $send_to_cc); $send_to_cc = ""; @@ -133,11 +135,12 @@ global $send_to, $send_to_cc, $reply_subj, $forward_subj, $body, $passed_body, $color, $use_signature, $signature, $editor_size, $attachments, $subject, $newmail, $use_javascript_addr_book, - $send_to_bcc, $reply_id, $mailbox; + $send_to_bcc, $reply_id, $mailbox, $from_htmladdr_search; - $subject = decodeHeader($subject); + $subject = sqStripSlashes(decodeHeader($subject)); $reply_subj = decodeHeader($reply_subj); $forward_subj = decodeHeader($forward_subj); + $body = sqStripSlashes($body); if ($use_javascript_addr_book) { echo "\n