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 3f9025524f712510d4f6e8196349909d09f1e0d3..c09b0945b2dfee9e54a768776e4be02504b72c2a 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) {