From 019050ba8286aae4da2d8c1fc7471a0cd13ac388 Mon Sep 17 00:00:00 2001 From: Brent Hopkins Date: Thu, 11 May 2023 16:37:21 -0500 Subject: [PATCH] Add function to use htmlentities without deprecated error --- functions.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/functions.php b/functions.php index 850b4cde..cc18fa72 100644 --- a/functions.php +++ b/functions.php @@ -45,6 +45,10 @@ function key32gen() return $key; } +function nullable_htmlentities($unsanitizedInput) { + return htmlentities($unsanitizedInput ?? ''); +} + function initials($str) { if (!empty($str)) { $ret = '';