Strip tags

This commit is contained in:
Thomas Tanghus 2012-03-12 20:17:19 +01:00
parent f6718dd889
commit beaa76feb2
2 changed files with 7 additions and 0 deletions

View file

@ -67,6 +67,9 @@ foreach($current as $item) {
if(is_array($value)) {
ksort($value); // NOTE: Important, otherwise the compound value will be set in the order the fields appear in the form!
$value = array_map('strip_tags', $value);
} else {
$value = strip_tags($value);
}
$property = $vcard->addProperty($name, $value); //, $parameters);

View file

@ -37,6 +37,10 @@ $line = OC_Contacts_App::getPropertyLineByChecksum($vcard, $checksum);
$value = $_POST['value'];
if(is_array($value)){
ksort($value); // NOTE: Important, otherwise the compound value will be set in the order the fields appear in the form!
$value = array_map('strip_tags', $value);
$value = OC_VObject::escapeSemicolons($value);
} else {
$value = strip_tags($value);
}
OC_Log::write('contacts','ajax/setproperty.php: setting: '.$vcard->children[$line]->name.': '.$value, OC_Log::DEBUG);
$vcard->children[$line]->setValue($value);