blob: a4dea90b95c49512072da3e96986c258bdcb13d6 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
<?php
namespace Zotlabs\Lib;
class Text {
/**
* use this on "body" or "content" input where angle chars shouldn't be removed,
* and allow them to be safely displayed.
*
* @param string $string
*
* @return string
*/
public static function escape_tags(string $string): string {
if (!$string) {
return EMPTY_STR;
}
return (htmlspecialchars($string, ENT_COMPAT, 'UTF-8', false));
}
}
|