From 00383950096f76b41333c42dfe26519bda288b52 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Fri, 5 May 2023 13:23:44 -0600 Subject: [PATCH] If numeric then don't need to escape Numeric should be safe as a pass thru. --- resources/functions.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/resources/functions.php b/resources/functions.php index 29ed34e9a4..a5b0ee7a11 100644 --- a/resources/functions.php +++ b/resources/functions.php @@ -1892,9 +1892,12 @@ function number_pad($number,$n) { //escape user data function escape($string) { - if (is_string($string) || is_numeric($string)) { + if (is_string($string)) { return htmlentities($string, ENT_QUOTES | ENT_HTML5, 'UTF-8'); } + elseif (is_numeric($string)) { + return $string; + } else { $string = (array) $string; if (is_string($string[0])) {