Simplify item sanitization in Util\ACLFormatter

This commit is contained in:
Hypolite Petovan 2020-12-30 21:11:24 -05:00
parent f0267fc441
commit e342f69e21

View file

@ -84,7 +84,7 @@ final class ACLFormatter
private function sanitizeItem(string &$item) { private function sanitizeItem(string &$item) {
// The item is an ACL int value // The item is an ACL int value
if (intval($item)) { if (intval($item)) {
$item = '<' . intval(Strings::escapeTags(trim($item))) . '>'; $item = '<' . intval($item) . '>';
// The item is a allowed ACL character // The item is a allowed ACL character
} elseif (in_array($item, [Group::FOLLOWERS, Group::MUTUALS])) { } elseif (in_array($item, [Group::FOLLOWERS, Group::MUTUALS])) {
$item = '<' . $item . '>'; $item = '<' . $item . '>';