private function _sanitize_naughty_html($str): string
    {
        $evil_html_tags = \implode('|', $this->_evil_html_tags);
        $str = (string) \preg_replace_callback(
            '#<(?<start>/*\s*)(?<content>' . $evil_html_tags . ')(?<end>[^><]*)(?<rest>[><]*)#ius',
            function ($matches) {
                return $this->_sanitize_naughty_html_callback($matches);
            },
            $str
        );

        return (string) $str;
    }
private function _sanitize_naughty_html($str): string
    {
        $evil_html_tags = \implode('|', $this->_evil_html_tags);
        $str = (string) \preg_replace_callback(
            '#<(?<start>/*\s*)(?<content>' . $evil_html_tags . ')(?<end>[^><]*)(?<rest>[><]*)#ius',
            function ($matches) {
                return $this->_sanitize_naughty_html_callback($matches);
            },
            $str
        );

        return (string) $str;
    }
private function _sanitize_naughty_html ( $ str ) : string { $ evil_html_tags = \ implode ( '|' , $ this -> _evil_html_tags ) ; $ str = ( string ) \ preg_replace_callback ( '#<(?<start>/*\s*)(?<content>' . $ evil_html_tags . ')(?<end>[^><]*)(?<rest>[><]*)#ius' , function ( $ matches ) { return $ this -> _sanitize_naughty_html_callback ( $ matches ) ; } , $ str ) ; return ( string ) $ str ; }
Sanitize naughty HTML elements.

<p>
<br />

If a tag containing any of the words in the list
below is found, the tag gets converted to entities.

<br /><br />

So this: <blink>
<br />
Becomes: &lt;blink&gt;
</p>

@param string $str

@return string
Sanitize naughty HTML elements .