From 17e2877c91dfc889ab5edb62fc6e00dd7dcbba01 Mon Sep 17 00:00:00 2001 From: Mario Date: Wed, 21 Feb 2024 10:44:56 +0000 Subject: make sure to decode html special chars before sending over the wire and --- include/text.php | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include') diff --git a/include/text.php b/include/text.php index 9d276642a..052c26594 100644 --- a/include/text.php +++ b/include/text.php @@ -114,6 +114,13 @@ function escape_tags($string) { return (htmlspecialchars($string, ENT_COMPAT, 'UTF-8', false)); } +function unescape_tags($string) { + if (!$string) { + return EMPTY_STR; + } + return (htmlspecialchars_decode($string, ENT_COMPAT)); +} + /** * Escape URL's so they're safe for use in HTML and in HTML element attributes. */ -- cgit v1.2.3