From b291f1bad3e7369c51b82cba16eddedbd88fc4a2 Mon Sep 17 00:00:00 2001 From: Mario Date: Sun, 10 Mar 2024 13:10:42 +0100 Subject: move escape_tags() to Lib/Text.php and add test --- include/text.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/text.php b/include/text.php index baf1f770b..acfef2d62 100644 --- a/include/text.php +++ b/include/text.php @@ -13,6 +13,7 @@ use Zotlabs\Lib\Crypto; use Zotlabs\Lib\SvgSanitizer; use Zotlabs\Lib\Libzot; use Zotlabs\Lib\AccessList; +use Zotlabs\Lib\Text; require_once("include/bbcode.php"); @@ -108,10 +109,7 @@ function notags($string) { * @return string */ function escape_tags($string) { - if (!$string) { - return EMPTY_STR; - } - return (htmlspecialchars($string, ENT_COMPAT, 'UTF-8', false)); + return Text::escape_tags($string); } function unescape_tags($string) { -- cgit v1.2.3