From: Christian Weiske Date: Mon, 30 Sep 2013 21:19:52 +0000 (+0200) Subject: Fix issue #10: vcards need CRLF and newline at the end X-Git-Tag: 0.8.0~6^2~3 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=323c95be58bcae4d11bab1a2b18a05420163ce53;p=contagged Fix issue #10: vcards need CRLF and newline at the end --- 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);