From 359e19a19dd45d64d14c7b29461f0fbe4f8a50bd Mon Sep 17 00:00:00 2001 From: alecpl Date: Wed, 3 Aug 2011 10:40:29 +0000 Subject: - Fix EOL character in vCard exports (#1487873) --- program/steps/addressbook/export.inc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'program/steps/addressbook') diff --git a/program/steps/addressbook/export.inc b/program/steps/addressbook/export.inc index f890aca69..a710aa204 100644 --- a/program/steps/addressbook/export.inc +++ b/program/steps/addressbook/export.inc @@ -73,7 +73,8 @@ header('Content-Disposition: attachment; filename="rcube_contacts.vcf"'); while ($result && ($row = $result->next())) { // we already have a vcard record if ($row['vcard'] && $row['name']) { - echo rcube_vcard::rfc2425_fold($row['vcard']) . "\n"; + $row['vcard'] = preg_replace('/\r?\n/', rcube_vcard::$eol, $row['vcard']); + echo rcube_vcard::rfc2425_fold($row['vcard']) . rcube_vcard::$eol; } // copy values into vcard object else { @@ -90,7 +91,7 @@ while ($result && ($row = $result->next())) { } } - echo $vcard->export(true) . "\n"; + echo $vcard->export(true) . rcube_vcard::$eol; } } -- cgit v1.2.3