From 98baf66a7f588eccf0b123c1bfc04eb6f0149910 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= <come.chilliet@fusiondirectory.org> Date: Tue, 23 Mar 2021 11:09:52 +0100 Subject: [PATCH] :ambulance: fix(core) Import htmlescape from 1.4-dev Needed by subscriptionInfo issue #6152 --- include/php_setup.inc | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/include/php_setup.inc b/include/php_setup.inc index 29f4ef362..2bc9c961e 100644 --- a/include/php_setup.inc +++ b/include/php_setup.inc @@ -26,6 +26,22 @@ */ require_once ("variables.inc"); +/*! + * \brief Escape string for HTML output + */ +function htmlescape ($str) +{ + return htmlspecialchars($str, ENT_QUOTES | ENT_HTML5, 'UTF-8'); +} + +/*! + * \brief Unescape string for HTML output, reverse of htmlescape + */ +function htmlunescape ($html) +{ + return html_entity_decode($html, ENT_QUOTES | ENT_HTML5, 'UTF-8'); +} + function html_trace($errstr = "") { static $hideArgs = array( -- GitLab