diff options
author | zotlabs <mike@macgirvin.com> | 2017-01-15 19:51:14 -0800 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2017-01-15 19:51:14 -0800 |
commit | c32bc9dda4dc08f2e4e72dc91c78457a0383244e (patch) | |
tree | f0fa883d753751fc9508bc98ff8e0bbb8540caaa /include | |
parent | d7080defd3b9d72a6e7988ce72a0ef2cdd39bb70 (diff) | |
download | volse-hubzilla-c32bc9dda4dc08f2e4e72dc91c78457a0383244e.tar.gz volse-hubzilla-c32bc9dda4dc08f2e4e72dc91c78457a0383244e.tar.bz2 volse-hubzilla-c32bc9dda4dc08f2e4e72dc91c78457a0383244e.zip |
more integration of vcard and profiles
Diffstat (limited to 'include')
-rw-r--r-- | include/connections.php | 7 | ||||
-rw-r--r-- | include/text.php | 4 |
2 files changed, 10 insertions, 1 deletions
diff --git a/include/connections.php b/include/connections.php index 31e941e95..8daa008c9 100644 --- a/include/connections.php +++ b/include/connections.php @@ -632,6 +632,9 @@ function random_profile() { function update_vcard($arr,$vcard = null) { + + // logger('update_vcard: ' . print_r($arr,true)); + $fn = $arr['fn']; @@ -816,8 +819,10 @@ function get_vcard_array($vc,$id) { $type = (($adr['TYPE']) ? vcard_translate_type((string)$adr['TYPE']) : ''); $adrs[] = [ 'type' => $type, - 'address' => escape_tags($adr->getParts()) + 'address' => $adr->getParts() ]; + $last_entry = end($adrs); + array_walk($adrs[$last_entry],'array_escape_tags'); } } diff --git a/include/text.php b/include/text.php index bc1eff7db..f5b1803c2 100644 --- a/include/text.php +++ b/include/text.php @@ -3128,4 +3128,8 @@ function cleanup_bbcode($body) { function array_trim(&$v,$k) { $v = trim($v); +} + +function array_escape_tags(&$v,$k) { + $v = escape_tags($v); }
\ No newline at end of file |