Browse Source

sanitizing vcard version field and providing empty firstname/lastname values.
It would be nicer to assume compatibility with some vcard version and try
extracting firstname/lastname/email info.

tokul 21 years ago
parent
commit
a4f632a7b7
1 changed files with 4 additions and 1 deletions
  1. 4 1
      src/vcard.php

+ 4 - 1
src/vcard.php

@@ -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) {