Made special character handling better in From and Subject
authorlkehresman <lkehresman@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 1 Dec 1999 20:45:05 +0000 (20:45 +0000)
committerlkehresman <lkehresman@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 1 Dec 1999 20:45:05 +0000 (20:45 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@47 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/mailbox.php

index 49ccc0f..45dbbb7 100644 (file)
                $from_num++;
             }
             else if (substr($read, 0, 5) == "Date:") {
-               $read = ereg_replace("<", "[", $read);
-               $read = ereg_replace(">", "]", $read);
+               $read = ereg_replace("<", "&lt;", $read);
+               $read = ereg_replace(">", "&gt;", $read);
                $date[$date_num] = substr($read, 5, strlen($read) - 6);
                $date_num++;
             }
             else if (substr($read, 0, 8) == "Subject:") {
-               $read = ereg_replace("<", "[", $read);
-               $read = ereg_replace(">", "]", $read);
+               $read = ereg_replace("<", "&lt;", $read);
+               $read = ereg_replace(">", "&gt;", $read);
                $subject[$subj_num] = substr($read, 8, strlen($read) - 9);
                $subj_num++;
             }