X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=src%2Fread_body.php;h=fc08e01c9992679a421c5e37bb3cbf18aee81d8d;hp=c987954b7c397e56d4d5ae6294b4991268ac86ea;hb=bc94707193083bed407443b3b9e1f101992b77c8;hpb=853b543dbd57499c467ed029bbf33ea25d306c55 diff --git a/src/read_body.php b/src/read_body.php index c987954b..d9a7fbe7 100644 --- a/src/read_body.php +++ b/src/read_body.php @@ -1,489 +1,865 @@ ' . - '
';
-
- $cnum = 0;
- for ($i=1; $i < count($read); $i++) {
- $line = htmlspecialchars($read[$i]);
- if (eregi("^>", $line)) {
- $second[$i] = $line;
- $first[$i] = ' ';
- $cnum++;
- } else if (eregi("^[ |\t]", $line)) {
- $second[$i] = $line;
- $first[$i] = '';
- } else if (eregi("^([^:]+):(.+)", $line, $regs)) {
- $first[$i] = $regs[1] . ':';
- $second[$i] = $regs[2];
- $cnum++;
- } else {
- $second[$i] = trim($line);
- $first[$i] = '';
- }
- }
- for ($i=0; $i < count($second); $i = $j) {
- if (isset($first[$i]))
- $f = $first[$i];
- if (isset($second[$i]))
- $s = nl2br($second[$i]);
- $j = $i + 1;
- while ($first[$j] == '' && $j < count($first)) {
- $s .= ' ' . nl2br($second[$j]);
- $j++;
- }
- parseEmail($s);
- if (isset($f)) echo " |