From 6f08038f34007e1294b940ba8a32fa63b229afe3 Mon Sep 17 00:00:00 2001 From: acognet Date: Tue, 19 Oct 2021 09:39:44 +0200 Subject: [PATCH] =?UTF-8?q?N=C2=B04347=20-=20Fix=20JS=20errors=20in=20cust?= =?UTF-8?q?om=20dashboards=20for=20list=20dahslets?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- js/dataTables.main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/dataTables.main.js b/js/dataTables.main.js index 1ea483a2e..7c7cd2904 100644 --- a/js/dataTables.main.js +++ b/js/dataTables.main.js @@ -10,7 +10,7 @@ function checkAllDataTable(tableId, value, listId) { if (value) { selectionMode = 'negative'; } - window['oSelectedItems'+listId.replace(/[^a-zA-Z0-9_]/, '')] = []; + window['oSelectedItems'+CombodoSanitizer.Sanitize(listId, '', CombodoSanitizer.ENUM_SANITIZATION_FILTER_VARIABLE_NAME)] = []; // Mark all the displayed items as check or unchecked depending on the value tableSelector.find(':checkbox[name^=selectObj]:not([disabled])').each(function () { let currentCheckbox = $(this); @@ -40,7 +40,7 @@ function updateDataTableSelection(listId, tableId) { let selectionMode = $('#'+listId+' [name=selectionMode]').val(); selectionContainer.html(''); - let currentSelection = window['oSelectedItems'+listId.replace(/[^a-zA-Z0-9_]/, '')]; + let currentSelection = window['oSelectedItems'+CombodoSanitizer.Sanitize(listId, '', CombodoSanitizer.ENUM_SANITIZATION_FILTER_VARIABLE_NAME)]; for (let i in currentSelection) { let value = currentSelection[i]; selectionContainer.append('');