From: lkehresman Date: Tue, 14 Dec 1999 21:08:56 +0000 (+0000) Subject: bugfixes X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=commitdiff_plain;h=e39d73e5a9af2cb71489b641750b45f1beba076f bugfixes git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@80 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/functions/mailbox_display.php b/functions/mailbox_display.php index 9b069dcd..bd01aeb0 100644 --- a/functions/mailbox_display.php +++ b/functions/mailbox_display.php @@ -11,7 +11,7 @@ function printMessageInfo($imapConnection, $t, $i, $from, $subject, $dateString, $answered, $seen, $mailbox, $sort, $startMessage) { $senderName = getSenderName($from); $urlMailbox = urlencode($mailbox); - $subject = trim($subject); + $subject = trim(stripslashes($subject)); echo "\n"; if ($seen == false) { echo " \n"; diff --git a/src/compose.php b/src/compose.php index 83cb45bd..c517b106 100644 --- a/src/compose.php +++ b/src/compose.php @@ -12,12 +12,23 @@ $imapConnection = loginToImapServer($username, $key, $imapServerAddress); displayPageHeader("None"); - if ($reply_id || $forward_id) { + if ($forward_id) { selectMailbox($imapConnection, $mailbox, $numMessages); - if ($reply_id) - $msg = fetchMessage($imapConnection, $reply_id); - else - $msg = fetchMessage($imapConnection, $forward_id); + $msg = fetchMessage($imapConnection, $forward_id); + + $body_ary = formatBody($msg); + $tmp = "-------- Original Message ---------\n"; + for ($i=0;$i < count($body_ary);$i++) { + $tmp .= strip_tags($body_ary[$i]); + $tmp = substr($tmp, 0, strlen($tmp) -1); + $body = "$body$tmp"; + $tmp = ""; + } + } + + if ($reply_id) { + selectMailbox($imapConnection, $mailbox, $numMessages); + $msg = fetchMessage($imapConnection, $reply_id); $body_ary = formatBody($msg); for ($i=0;$i < count($body_ary);$i++) { @@ -27,6 +38,9 @@ } } + $send_to = ereg_replace("\"", "", $send_to); + $send_to = stripslashes($send_to); + echo "
\n"; echo "\n"; echo " \n"; diff --git a/src/read_body.php b/src/read_body.php index 88c1093f..c55a14de 100644 --- a/src/read_body.php +++ b/src/read_body.php @@ -20,7 +20,7 @@ displayPageHeader($mailbox); /** translate the subject and mailbox into url-able text **/ - $url_subj = urlencode(trim($message["HEADER"]["SUBJECT"])); + $url_subj = urlencode(trim(stripslashes($message["HEADER"]["SUBJECT"]))); $urlMailbox = urlencode($mailbox); $url_replyto = urlencode($message["HEADER"]["REPLYTO"]); @@ -76,7 +76,7 @@ /** make sure everything will display in HTML format **/ $from_name = htmlspecialchars($message["HEADER"]["FROM"]); - $subject = htmlspecialchars($message["HEADER"]["SUBJECT"]); + $subject = htmlspecialchars(stripslashes($message["HEADER"]["SUBJECT"])); echo "
"; echo "
\n";