1
0
mirror of https://github.com/owncloudarchive/contacts.git synced 2024-12-01 13:24:10 +01:00

Contacts: Avoid double escaping on serialize.

This commit is contained in:
Thomas Tanghus 2013-03-10 12:49:36 +01:00
parent e811e010c4
commit e8a2b6fc74

View File

@ -1,6 +1,6 @@
<?php <?php
/** /**
* ownCloud - VCard component * ownCloud - VObject String Property
* *
* This component represents the BEGIN:VCARD and END:VCARD found in every * This component represents the BEGIN:VCARD and END:VCARD found in every
* vcard. * vcard.
@ -50,16 +50,19 @@ class StringProperty extends VObject\Property {
} }
$src = array( $src = array(
"\n",); '\\',
/* ';', "\n",
';',
',', ',',
);*/ );
$out = array( $out = array(
'\n',); '\\\\',
/* '\;', '\n',
'\;',
'\,', '\,',
);*/ );
$str.=':' . str_replace($src, $out, $this->value); $value = strtr($this->value, array('\,' => ',', '\;' => ';', '\\\\' => '\\'));
$str.=':' . str_replace($src, $out, $value);
$out = ''; $out = '';
while(strlen($str) > 0) { while(strlen($str) > 0) {