From 8f48deca1406626c31f081b52662546f98a0bfbe Mon Sep 17 00:00:00 2001 From: Alejandro Gallardo Escobar Date: Tue, 16 Apr 2019 09:49:50 +0200 Subject: [PATCH] Visual Console Refactor: removed the html entities from the main model data output Former-commit-id: c8dfcdd77c7138a6644a3e785f652619bd4b852c --- .../include/rest-api/models/VisualConsole/Container.php | 3 +++ .../include/rest-api/models/VisualConsole/Item.php | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/pandora_console/include/rest-api/models/VisualConsole/Container.php b/pandora_console/include/rest-api/models/VisualConsole/Container.php index 7710121cb4..7f20c1f006 100644 --- a/pandora_console/include/rest-api/models/VisualConsole/Container.php +++ b/pandora_console/include/rest-api/models/VisualConsole/Container.php @@ -213,6 +213,9 @@ final class Container extends Model include_once $config['homedir'].'/include/functions_io.php'; include_once $config['homedir'].'/include/functions_ui.php'; + // Clean HTML entities. + $row = \io_safe_output($row); + $backgroundUrl = static::extractBackgroundUrl($row); $backgroundImage = static::extractBackgroundImage($row); diff --git a/pandora_console/include/rest-api/models/VisualConsole/Item.php b/pandora_console/include/rest-api/models/VisualConsole/Item.php index 2dfe0233a6..664e9c5868 100644 --- a/pandora_console/include/rest-api/models/VisualConsole/Item.php +++ b/pandora_console/include/rest-api/models/VisualConsole/Item.php @@ -669,6 +669,13 @@ class Item extends Model throw new \Exception('error fetching the data from the DB'); } + // Load side libraries. + global $config; + include_once $config['homedir'].'/include/functions_io.php'; + + // Clean HTML entities. + $row = \io_safe_output($row); + /* * Retrieve extra data. */