sanitizing vcard version field and providing empty firstname/lastname values.
authortokul <tokul@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 7 Sep 2004 10:02:04 +0000 (10:02 +0000)
committertokul <tokul@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 7 Sep 2004 10:02:04 +0000 (10:02 +0000)
It would be nicer to assume compatibility with some vcard version and try
extracting firstname/lastname/email info.

git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@8029 7612ce4b-ef26-0410-bec9-ea0150e637f0

src/vcard.php

index 3f90255..c09b094 100644 (file)
@@ -94,8 +94,11 @@ if ($vcard_nice['version'] == '2.1') {
     }
 } else {
     echo '<tr><td align="center">' .
-         sprintf(_("vCard Version %s is not supported. Some information might not be converted correctly."),$vcard_nice['version']) .
+         sprintf(_("vCard Version %s is not supported. Some information might not be converted correctly."),
+                 htmlspecialchars($vcard_nice['version'])) .
          "</td></tr>\n";
+    $vcard_nice['firstname']='';
+    $vcard_nice['lastname']='';
 }
 
 foreach ($vcard_nice as $k => $v) {