thirdparty/htmlpurifier-4.0.0-lite/library/HTMLPurifier/ErrorCollector.php
public function getHTMLFormatted($config, $errors = null) {
        $ret = array();

        $this->generator = new HTMLPurifier_Generator($config, $this->context);
        if ($errors === null) $errors = $this->errors;

        // 'At line' message needs to be removed

        // generation code for new structure goes here. It needs to be recursive.
        foreach ($this->lines as $line => $col_array) {
            if ($line == -1) continue;
            foreach ($col_array as $col => $struct) {
                $this->_renderStruct($ret, $struct, $line, $col);
            }
        }
        if (isset($this->lines[-1])) {
            $this->_renderStruct($ret, $this->lines[-1]);
        }

        if (empty($errors)) {
            return '<p>' . $this->locale->getMessage('ErrorCollector: No errors') . '</p>';
        } else {
            return '<ul><li>' . implode('</li><li>', $ret) . '</li></ul>';
        }

    }
public function getHTMLFormatted($config, $errors = null) {
        $ret = array();

        $this->generator = new HTMLPurifier_Generator($config, $this->context);
        if ($errors === null) $errors = $this->errors;

        // 'At line' message needs to be removed

        // generation code for new structure goes here. It needs to be recursive.
        foreach ($this->lines as $line => $col_array) {
            if ($line == -1) continue;
            foreach ($col_array as $col => $struct) {
                $this->_renderStruct($ret, $struct, $line, $col);
            }
        }
        if (isset($this->lines[-1])) {
            $this->_renderStruct($ret, $this->lines[-1]);
        }

        if (empty($errors)) {
            return '<p>' . $this->locale->getMessage('ErrorCollector: No errors') . '</p>';
        } else {
            return '<ul><li>' . implode('</li><li>', $ret) . '</li></ul>';
        }

    }
public function getHTMLFormatted ( $ config , $ errors = null ) { $ ret = array ( ) ; $ this -> generator = new HTMLPurifier_Generator ( $ config , $ this -> context ) ; if ( $ errors === null ) $ errors = $ this -> errors ; // 'At line' message needs to be removed // generation code for new structure goes here. It needs to be recursive. foreach ( $ this -> lines as $ line => $ col_array ) { if ( $ line == - 1 ) continue ; foreach ( $ col_array as $ col => $ struct ) { $ this -> _renderStruct ( $ ret , $ struct , $ line , $ col ) ; } } if ( isset ( $ this -> lines [ - 1 ] ) ) { $ this -> _renderStruct ( $ ret , $ this -> lines [ - 1 ] ) ; } if ( empty ( $ errors ) ) { return '<p>' . $ this -> locale -> getMessage ( 'ErrorCollector: No errors' ) . '</p>' ; } else { return '<ul><li>' . implode ( '</li><li>' , $ ret ) . '</li></ul>' ; } }
Default HTML formatting implementation for error messages
@param $config Configuration array, vital for HTML output nature
@param $errors Errors array to display; used for recursion.
Default HTML formatting implementation for error messages