summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
authortill <till@php.net>2008-03-22 12:50:03 +0000
committertill <till@php.net>2008-03-22 12:50:03 +0000
commit14432db388f6fc655e8661406d7904291bd09468 (patch)
tree9324fc64cff9c89ff612a61ce4560ed7a373d704 /program
parentbf1be0c931904e45122cf8eeec3bf20cc6e91bd5 (diff)
* applying patch from #1484811
Diffstat (limited to 'program')
-rw-r--r--program/lib/imap.inc17
1 files changed, 9 insertions, 8 deletions
diff --git a/program/lib/imap.inc b/program/lib/imap.inc
index 905d3e2e5..3d20d9e37 100644
--- a/program/lib/imap.inc
+++ b/program/lib/imap.inc
@@ -1596,7 +1596,8 @@ function iil_C_FetchHeaders(&$conn, $mailbox, $message_set, $uidfetch=false)
while ( list($lines_key, $str) = each($lines) ) {
list($field, $string) = iil_SplitHeaderLine($str);
- $field = strtolower($field);
+ $field = strtolower($field);
+ $string = ereg_replace("\n[[:space:]]*"," ",$string);
switch ($field) {
case 'date';
@@ -1607,22 +1608,22 @@ function iil_C_FetchHeaders(&$conn, $mailbox, $message_set, $uidfetch=false)
$result[$id]->from = $string;
break;
case 'to':
- $result[$id]->to = str_replace("\n", " ", $string);
+ $result[$id]->to = $string;
break;
case 'subject':
- $result[$id]->subject = str_replace("\n", '', $string);
+ $result[$id]->subject = $string;
break;
case 'reply-to':
- $result[$id]->replyto = str_replace("\n", " ", $string);
+ $result[$id]->replyto = $string;
break;
case 'cc':
- $result[$id]->cc = str_replace("\n", " ", $string);
+ $result[$id]->cc = $string;
break;
case 'bcc':
- $result[$id]->bcc = str_replace("\n", " ", $string);
+ $result[$id]->bcc = $string;
break;
case 'content-transfer-encoding':
- $result[$id]->encoding = str_replace("\n", " ", $string);
+ $result[$id]->encoding = $string;
break;
case 'content-type':
$ctype_parts = explode(";", $string);
@@ -1643,7 +1644,7 @@ function iil_C_FetchHeaders(&$conn, $mailbox, $message_set, $uidfetch=false)
case 'return-receipt-to':
case 'disposition-notification-to':
case 'x-confirm-reading-to':
- $result[$id]->mdn_to = str_replace("\n", " ", $string);
+ $result[$id]->mdn_to = $string;
break;
case 'message-id':
$result[$id]->messageID = $string;