src/Graby.php
private function cleanupXss($html)
    {
        if (false === $this->config['xss_filter']) {
            return $html;
        }

        $this->logger->info('Filtering HTML to remove XSS');

        return htmLawed(
            $html,
            [
                'safe' => 1,
                // *+iframe: do not remove iframe elements
                'elements' => '*+iframe-meta',
                'deny_attribute' => 'style',
                'comment' => 1,
                'cdata' => 1,
            ]
        );
    }
private function cleanupXss($html)
    {
        if (false === $this->config['xss_filter']) {
            return $html;
        }

        $this->logger->info('Filtering HTML to remove XSS');

        return htmLawed(
            $html,
            [
                'safe' => 1,
                // *+iframe: do not remove iframe elements
                'elements' => '*+iframe-meta',
                'deny_attribute' => 'style',
                'comment' => 1,
                'cdata' => 1,
            ]
        );
    }
private function cleanupXss ( $ html ) { if ( false === $ this -> config [ 'xss_filter' ] ) { return $ html ; } $ this -> logger -> info ( 'Filtering HTML to remove XSS' ) ; return htmLawed ( $ html , [ 'safe' => 1 , // *+iframe: do not remove iframe elements 'elements' => '*+iframe-meta' , 'deny_attribute' => 'style' , 'comment' => 1 , 'cdata' => 1 , ] ) ; }
Try to cleanup XSS using htmLawed.

@param string $html

@return string
Try to cleanup XSS using htmLawed .