]> git.mxchange.org Git - friendica.git/blobdiff - mod/acl.php
Merge pull request #6340 from MrPetovan/bug/1495-fix-admin-theme-settings
[friendica.git] / mod / acl.php
index a63cd83ae08d63809beae696abf7cff5f7bbe1b1..e91919265b350e51b1ec3808b0b527723390edae 100644 (file)
@@ -12,8 +12,7 @@ use Friendica\Database\DBA;
 use Friendica\Model\Contact;
 use Friendica\Model\Item;
 use Friendica\Util\Proxy as ProxyUtils;
-
-require_once 'include/dba.php';
+use Friendica\Util\Strings;
 
 function acl_content(App $a)
 {
@@ -126,7 +125,7 @@ function acl_content(App $a)
                        $groups[] = [
                                'type'  => 'g',
                                'photo' => 'images/twopeople.png',
-                               'name'  => htmlentities($g['name']),
+                               'name'  => htmlspecialchars($g['name']),
                                'id'    => intval($g['id']),
                                'uids'  => array_map('intval', explode(',', $g['uids'])),
                                'link'  => '',
@@ -188,7 +187,7 @@ function acl_content(App $a)
                );
        } elseif ($type == 'x') {
                // autocomplete for global contact search (e.g. navbar search)
-               $search = notags(trim($_REQUEST['search']));
+               $search = Strings::escapeTags(trim($_REQUEST['search']));
                $mode = $_REQUEST['smode'];
 
                $r = ACL::contactAutocomplete($search, $mode);
@@ -197,7 +196,7 @@ function acl_content(App $a)
                foreach ($r as $g) {
                        $contacts[] = [
                                'photo'   => ProxyUtils::proxifyUrl($g['photo'], false, ProxyUtils::SIZE_MICRO),
-                               'name'    => $g['name'],
+                               'name'    => htmlspecialchars($g['name']),
                                'nick'    => defaults($g, 'addr', $g['url']),
                                'network' => $g['network'],
                                'link'    => $g['url'],
@@ -219,7 +218,7 @@ function acl_content(App $a)
                        $entry = [
                                'type'    => 'c',
                                'photo'   => ProxyUtils::proxifyUrl($g['micro'], false, ProxyUtils::SIZE_MICRO),
-                               'name'    => htmlentities($g['name']),
+                               'name'    => htmlspecialchars($g['name']),
                                'id'      => intval($g['id']),
                                'network' => $g['network'],
                                'link'    => $g['url'],
@@ -280,7 +279,7 @@ function acl_content(App $a)
                                $unknown_contacts[] = [
                                        'type'    => 'c',
                                        'photo'   => ProxyUtils::proxifyUrl($contact['micro'], false, ProxyUtils::SIZE_MICRO),
-                                       'name'    => htmlentities($contact['name']),
+                                       'name'    => htmlspecialchars($contact['name']),
                                        'id'      => intval($contact['cid']),
                                        'network' => $contact['network'],
                                        'link'    => $contact['url'],