diff options
author | Mario <mario@mariovavti.com> | 2024-03-10 13:10:42 +0100 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2024-03-10 13:10:42 +0100 |
commit | b291f1bad3e7369c51b82cba16eddedbd88fc4a2 (patch) | |
tree | f77c723d2a6a6ce0b8d2dc22dceea14703e2cff7 /include/text.php | |
parent | e1b660bfa3c7d76f648349318e1526193b6e482d (diff) | |
download | volse-hubzilla-b291f1bad3e7369c51b82cba16eddedbd88fc4a2.tar.gz volse-hubzilla-b291f1bad3e7369c51b82cba16eddedbd88fc4a2.tar.bz2 volse-hubzilla-b291f1bad3e7369c51b82cba16eddedbd88fc4a2.zip |
move escape_tags() to Lib/Text.php and add test
Diffstat (limited to 'include/text.php')
-rw-r--r-- | include/text.php | 6 |
1 files changed, 2 insertions, 4 deletions
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) { |