]> git.sur5r.net Git - contagged/commitdiff
Fix issue #10: vcards need CRLF and newline at the end
authorChristian Weiske <cweiske@cweiske.de>
Mon, 30 Sep 2013 21:19:52 +0000 (23:19 +0200)
committerChristian Weiske <cweiske@cweiske.de>
Mon, 30 Sep 2013 21:19:52 +0000 (23:19 +0200)
entry.php

index 2bf488a7f15e3bff60579c19f1baf7bf37de9756..1e5e7552976de876ee184fccb105b3866df15614 100644 (file)
--- 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);