From 8c704951e1d20327efeaa98f051764b5f30afd37 Mon Sep 17 00:00:00 2001 From: Molkobain Date: Mon, 19 Aug 2024 18:41:32 +0200 Subject: [PATCH] =?UTF-8?q?N=C2=B07730=20-=20Rename=20constant=20as=20it?= =?UTF-8?q?=20is=20actually=20for=20ID=20and=20class=20selectors,=20not=20?= =?UTF-8?q?only=20IDs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/utils.inc.php | 6 +++--- pages/ajax.render.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/application/utils.inc.php b/application/utils.inc.php index c02076345..910a86aad 100644 --- a/application/utils.inc.php +++ b/application/utils.inc.php @@ -110,10 +110,10 @@ class utils */ public const ENUM_SANITIZATION_FILTER_ELEMENT_IDENTIFIER = 'element_identifier'; /** - * @var string For XML / HTML node id selector + * @var string For XML / HTML node id/class selector * @since 3.1.2 3.2.1 */ - public const ENUM_SANITIZATION_FILTER_ELEMENT_ID_SELECTOR = 'element_id_selector'; + public const ENUM_SANITIZATION_FILTER_ELEMENT_SELECTOR = 'element_selector'; /** * @var string For variables names * @since 3.0.0 @@ -502,7 +502,7 @@ class utils break; // For XML / HTML node id selector - case static::ENUM_SANITIZATION_FILTER_ELEMENT_ID_SELECTOR: + case static::ENUM_SANITIZATION_FILTER_ELEMENT_SELECTOR: $retValue = filter_var($value, FILTER_VALIDATE_REGEXP, ['options' => ['regexp' => '/^[#\.][A-Za-z0-9][A-Za-z0-9_-]*$/']]); break; diff --git a/pages/ajax.render.php b/pages/ajax.render.php index 8fe6dc40d..0f84d5eea 100644 --- a/pages/ajax.render.php +++ b/pages/ajax.render.php @@ -771,7 +771,7 @@ try $sAction = utils::ReadParam('action', ''); $sSelectionMode = utils::ReadParam('selection_mode'); $sResultListOuterSelector = utils::ReadParam('result_list_outer_selector', null,false, utils::ENUM_SANITIZATION_FILTER_ELEMENT_IDENTIFIER); // actually an Id not a selector - $scssCount = utils::ReadParam('css_count', null,false,utils::ENUM_SANITIZATION_FILTER_ELEMENT_ID_SELECTOR); + $scssCount = utils::ReadParam('css_count', null,false,utils::ENUM_SANITIZATION_FILTER_ELEMENT_SELECTOR); $sTableInnerId = utils::ReadParam('table_inner_id', null,false, utils::ENUM_SANITIZATION_FILTER_ELEMENT_IDENTIFIER); $oFilter = new DBObjectSearch($sClass);