From 76d6f179c6072877734323c9ee8b144b14d1672f Mon Sep 17 00:00:00 2001 From: ralf Date: Fri, 5 Apr 2024 10:44:49 +0200 Subject: [PATCH] fix double encoding of tree items --- api/src/Etemplate/Widget/Tree.php | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/api/src/Etemplate/Widget/Tree.php b/api/src/Etemplate/Widget/Tree.php index 3d677b8608..801b0cca13 100644 --- a/api/src/Etemplate/Widget/Tree.php +++ b/api/src/Etemplate/Widget/Tree.php @@ -169,31 +169,11 @@ class Tree extends Etemplate\Widget Api\Json\Request::isJSONRequest(false); header('Content-Type: application/json; charset=utf-8'); - echo json_encode(self::htmlencode_node($data)); + echo json_encode($data); exit; } - /** - * HTML encoding of text and tooltip of node including all children - * - * @param array $item - * @return array - */ - public static function htmlencode_node(array $item) - { - $item['text'] = Api\Html::htmlspecialchars($item['text']); - - if (isset($item['item']) && is_array($item['item'])) - { - foreach($item['item'] as &$child) - { - $child = self::htmlencode_node($child); - } - } - return $item; - } - /** * Check if given $id is one of given tree *