From aced2ccd99afcc30a9d04d7002ff5fd8ab2166f9 Mon Sep 17 00:00:00 2001 From: Klaus Leithoff Date: Mon, 27 Aug 2012 12:27:05 +0000 Subject: [PATCH] fix problem when vcf-cards have double carriage returns (such as crcrlf) this seems to break the v-card --- felamimail/inc/class.uidisplay.inc.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/felamimail/inc/class.uidisplay.inc.php b/felamimail/inc/class.uidisplay.inc.php index c9f3176e51..3765a839a6 100644 --- a/felamimail/inc/class.uidisplay.inc.php +++ b/felamimail/inc/class.uidisplay.inc.php @@ -1193,6 +1193,9 @@ if (strtoupper($attachment['type']) == 'TEXT/X-VCARD') { $addressbook_vcal = new addressbook_vcal(); + // double \r\r\n seems to end a vcard prematurely, so we set them to \r\n + //error_log(__METHOD__.__LINE__.$attachment['attachment']); + $attachment['attachment'] = str_replace("\r\r\n", "\r\n", $attachment['attachment']); $vcard = $addressbook_vcal->vcardtoegw($attachment['attachment']); //error_log(print_r($vcard,true)); if ($vcard['uid']) $contact = $addressbook_vcal->find_contact($vcard,false);