public function preView($output) {
        /** @var $purifierConfig \HTMLPurifier_Config */
        $purifierConfig = \HTMLPurifier_Config::createDefault();
        $purifierConfig->set('Core.Encoding', 'UTF-8');
        $purifierConfig->set('HTML.TidyLevel', 'medium');

        /** @var \HTMLPurifier_Config $purifierConfig */
        $purifier = new \HTMLPurifier($purifierConfig);
        $output   = $purifier->purify($output);

        return $output;
    }
public function preView($output) {
        /** @var $purifierConfig \HTMLPurifier_Config */
        $purifierConfig = \HTMLPurifier_Config::createDefault();
        $purifierConfig->set('Core.Encoding', 'UTF-8');
        $purifierConfig->set('HTML.TidyLevel', 'medium');

        /** @var \HTMLPurifier_Config $purifierConfig */
        $purifier = new \HTMLPurifier($purifierConfig);
        $output   = $purifier->purify($output);

        return $output;
    }
public function preView ( $ output ) { /** @var $purifierConfig \HTMLPurifier_Config */ $ purifierConfig = \ HTMLPurifier_Config :: createDefault ( ) ; $ purifierConfig -> set ( 'Core.Encoding' , 'UTF-8' ) ; $ purifierConfig -> set ( 'HTML.TidyLevel' , 'medium' ) ; /** @var \HTMLPurifier_Config $purifierConfig */ $ purifier = new \ HTMLPurifier ( $ purifierConfig ) ; $ output = $ purifier -> purify ( $ output ) ; return $ output ; }
Callback method to sanitize HTML output

@param string $output HTML output string
@return string
Callback method to sanitize HTML output