private function filterEntities(string $string): string
    {
        return preg_replace_callback(
            '/&\w+;/',
            function ($match) {
                return str_repeat(' ', strlen($match[0]));
            },
            $string
        );
    }
private function filterEntities(string $string): string
    {
        return preg_replace_callback(
            '/&\w+;/',
            function ($match) {
                return str_repeat(' ', strlen($match[0]));
            },
            $string
        );
    }
private function filterEntities ( string $ string ) : string { return preg_replace_callback ( '/&\w+;/' , function ( $ match ) { return str_repeat ( ' ' , strlen ( $ match [ 0 ] ) ) ; } , $ string ) ; }
Replace HTML entities.

@param string $string

@return string
Replace HTML entities .