From 12ce71866296dcba09ae04f32ababb8d71abb0bc Mon Sep 17 00:00:00 2001 From: Stephen Abello Date: Wed, 12 Feb 2020 14:48:33 +0100 Subject: [PATCH] Internal: Add HtmlEntityDecode() to utils, a counterpart to HtmlEntities() --- application/utils.inc.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/application/utils.inc.php b/application/utils.inc.php index 2f16eabbb..23da0f53f 100644 --- a/application/utils.inc.php +++ b/application/utils.inc.php @@ -1505,6 +1505,17 @@ class utils public static function HtmlEntities($sValue) { return htmlentities($sValue, ENT_QUOTES, 'UTF-8'); + } + + /** + * Helper to encapsulation iTop's html_entity_decode + * @param string $sValue + * @return string + * @since 2.7.0 + */ + public static function HtmlEntityDecode($sValue) + { + return html_entity_decode($sValue, ENT_QUOTES, 'UTF-8'); } /**