19 declare(strict_types=1);
    31     protected function secure(
string $string): string
    34         $temp_string = mb_convert_encoding($string, 
'UTF-8', 
'UTF-8');
    37         $temp_string = preg_replace(
'/[\x{10000}-\x{10FFFF}]/u', 
'', $temp_string);
    40         $temp_string = preg_replace(
'#\p{C}+#u', 
'', $temp_string);
    41         if ($temp_string === null) {
    51         return htmlspecialchars(
    52             strip_tags($temp_string),