mirror of
https://github.com/nextcloud/server.git
synced 2026-06-10 09:13:19 -04:00
Strip tags
This commit is contained in:
parent
f6718dd889
commit
beaa76feb2
2 changed files with 7 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue