From 04913d61a03e1229bd1f176e9cdff69be1893b83 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Sat, 21 Jun 2025 11:51:19 -0600 Subject: [PATCH] Add escape_textarea for backwards compatibility --- resources/functions.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/resources/functions.php b/resources/functions.php index 732d2babc2..01758e3566 100644 --- a/resources/functions.php +++ b/resources/functions.php @@ -2044,6 +2044,17 @@ return false; } +/** + * Escape the user data for a textarea + *

Escapes & " ' < and > characters

+ * @param string $string the value to escape + * @return string + * @link https://www.php.net/htmlspecialchars + */ +function escape_textarea($string) { + return htmlspecialchars($string, ENT_QUOTES, 'UTF-8'); +} + //output pre-formatted array keys and values if (!function_exists('view_array')) {