]> source.dussan.org Git - nextcloud-server.git/commitdiff
Contacts: Apply strip_tags on compound values.
authorThomas Tanghus <thomas@tanghus.net>
Mon, 20 Feb 2012 13:36:21 +0000 (14:36 +0100)
committerThomas Tanghus <thomas@tanghus.net>
Mon, 20 Feb 2012 13:36:21 +0000 (14:36 +0100)
apps/contacts/ajax/addproperty.php
apps/contacts/ajax/saveproperty.php

index 03a45532f9b3c7154746723efb549c798957032a..028974e1c66b1bc38dea45ec7512127a3a1e07aa 100644 (file)
@@ -66,6 +66,7 @@ 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);
 }
index 6c8132c1dbffcf98cfb910646e000a4200fed31b..0c9e0cc7836aeeaa316187edf5210595b410a704 100644 (file)
@@ -52,6 +52,7 @@ $checksum = isset($_POST['checksum'])?$_POST['checksum']:null;
 // }
 
 if(is_array($value)){ // FIXME: How to strip_tags for compound values?
+       $value = array_map('strip_tags', $value);
        ksort($value); // NOTE: Important, otherwise the compound value will be set in the order the fields appear in the form!
        $value = OC_VObject::escapeSemicolons($value);
 } else {