fix problem when vcf-cards have double carriage returns (such as crcrlf) this seems to break the v-card

This commit is contained in:
Klaus Leithoff 2012-08-27 12:04:49 +00:00
parent bb64a1ed2a
commit 846fa9eff9

View File

@ -1381,6 +1381,9 @@ blockquote[type=cite] {
if (strtoupper($attachment['type']) == 'TEXT/X-VCARD' || strtoupper($attachment['type']) == 'TEXT/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']);
if ($vcard['uid'])
{