move escape_tags() to Lib/Text.php and add test

This commit is contained in:
Mario
2024-03-10 13:10:42 +01:00
parent e1b660bfa3
commit b291f1bad3

View File

@@ -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) {