public static function purify($dirtyHtml)
    {
        if (self::$htmlPurifier && self::$htmlPurifier instanceof \HTMLPurifier) {
            $purifier = self::$htmlPurifier;
        } else {
            $purifier = (self::$htmlPurifier = new \HTMLPurifier(\HTMLPurifier_Config::createDefault()));
        }
        return $purifier->purify($dirtyHtml);
    }
public static function purify($dirtyHtml)
    {
        if (self::$htmlPurifier && self::$htmlPurifier instanceof \HTMLPurifier) {
            $purifier = self::$htmlPurifier;
        } else {
            $purifier = (self::$htmlPurifier = new \HTMLPurifier(\HTMLPurifier_Config::createDefault()));
        }
        return $purifier->purify($dirtyHtml);
    }
public static function purify ( $ dirtyHtml ) { if ( self :: $ htmlPurifier && self :: $ htmlPurifier instanceof \ HTMLPurifier ) { $ purifier = self :: $ htmlPurifier ; } else { $ purifier = ( self :: $ htmlPurifier = new \ HTMLPurifier ( \ HTMLPurifier_Config :: createDefault ( ) ) ) ; } return $ purifier -> purify ( $ dirtyHtml ) ; }
Purify dirty html

@param $dirtyHtml
@return mixed
Purify dirty html