bugfixes
authorlkehresman <lkehresman@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 14 Dec 1999 21:08:56 +0000 (21:08 +0000)
committerlkehresman <lkehresman@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 14 Dec 1999 21:08:56 +0000 (21:08 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@80 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/mailbox_display.php
src/compose.php
src/read_body.php

index 9b069dc..bd01aeb 100644 (file)
@@ -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 "<TR>\n";
       if ($seen == false) {
          echo "   <TD><FONT FACE=\"Arial,Helvetica\"><nobr><B><input type=checkbox name=\"msg[$t]\" value=$i></B></nobr></FONT></TD>\n";
index 83cb45b..c517b10 100644 (file)
    $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 "<FORM action=\"compose_send.php\" METHOD=POST>\n";
    echo "<TABLE COLS=2 WIDTH=50 ALIGN=CENTER CELLSPACING=0 BORDER=0>\n";
    echo "   <TR>\n";
index 88c1093..c55a14d 100644 (file)
@@ -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 "<BR>";
    echo "<TABLE COLS=1 WIDTH=95% BORDER=0 ALIGN=CENTER CELLPADDING=2>\n";