# You should have received a copy of the GNU Affero General Public License
 # along with Confetti.  If not, see <http://www.gnu.org/licenses/>. 
 
-echo -n "Content-Type: text/vcard;charset=utf-8\n\n"
-card="${_GET[card]}"
-cat "$_DATA/vcard/$card"
+card="$(GET card |PATH)"
+cardfile="$_DATA/vcard/${card##*/}"
+
+if [ -f "$cardfile" ]; then 
+  . $_EXEC/cgilite/file.sh
+  FILE "$cardfile" "text/vcard/charset=utf-8"
+else
+fi
 
       ]
       [div .control
         [a .item href="/cards/edit_card.sh?card=${cardfile##*/}" $(l10n edit)]
-        [a .item href="/cards/?x=${cardfile##*/}" $(l10n vcf_export)]
+        [a .item href="/cards/export_card.sh?card=${cardfile##*/}" $(l10n vcf_export)]
       ]
     ]
        EOF