mirror of
https://github.com/owncloudarchive/contacts.git
synced 2024-12-02 14:24:10 +01:00
Contacts: Properly escape commas and semi-colons.
Conflicts: contacts/appinfo/app.php
This commit is contained in:
parent
c831ef03d2
commit
c0a474dd33
@ -74,6 +74,7 @@ $checksum = isset($_POST['checksum'])?$_POST['checksum']:null;
|
||||
debug('value: ' . print_r($value, 1));
|
||||
|
||||
$multi_properties = array('EMAIL', 'TEL', 'IMPP', 'ADR', 'URL');
|
||||
$string_properties = array('FN', 'NICKNAME', 'NOTE', 'EMAIL', 'TEL', 'IMPP', 'ADR', 'URL');
|
||||
|
||||
if(!$name) {
|
||||
bailOut(App::$l10n->t('element name is not set.'));
|
||||
@ -200,6 +201,9 @@ if(!$value) {
|
||||
unset($vcard->{$name});
|
||||
}
|
||||
} else {
|
||||
if(in_array($name, $string_properties)) {
|
||||
$value = strtr($value, array(',' => '\,', ';' => '\;'));
|
||||
}
|
||||
/* setting value */
|
||||
switch($element) {
|
||||
case 'BDAY':
|
||||
|
Loading…
Reference in New Issue
Block a user