From 323c95be58bcae4d11bab1a2b18a05420163ce53 Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Mon, 30 Sep 2013 23:19:52 +0200 Subject: [PATCH] Fix issue #10: vcards need CRLF and newline at the end --- entry.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/entry.php b/entry.php index 2bf488a..1e5e755 100644 --- a/entry.php +++ b/entry.php @@ -71,7 +71,9 @@ if($_REQUEST['mode']=='vcf'){ $filename = $entry['givenname'].'_'.$entry['name'].'.vcf'; header("Content-Disposition: attachment; filename=\"$filename\""); header("Content-type: text/x-vcard; name=\"$filename\"; charset=utf-8"); - $smarty->display($template); + $output = $smarty->fetch($template) . "\n"; + $output = str_replace("\n", "\r\n", $output); + echo $output; }else{ header('Content-Type: text/html; charset=utf-8'); $smarty->display($template); -- 2.39.2