protected function wrapHTML($html, $config, $context)
    {
        $def = $config->getDefinition('HTML');
        $ret = '';

        if (!empty($def->doctype->dtdPublic) || !empty($def->doctype->dtdSystem)) {
            $ret .= '<!DOCTYPE html ';
            if (!empty($def->doctype->dtdPublic)) {
                $ret .= 'PUBLIC "' . $def->doctype->dtdPublic . '" ';
            }
            if (!empty($def->doctype->dtdSystem)) {
                $ret .= '"' . $def->doctype->dtdSystem . '" ';
            }
            $ret .= '>';
        }

        $ret .= '<html><head>';
        $ret .= '<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />';
        // No protection if $html contains a stray </div>!
        $ret .= '</head><body>' . $html . '</body></html>';
        return $ret;
    }
protected function wrapHTML($html, $config, $context)
    {
        $def = $config->getDefinition('HTML');
        $ret = '';

        if (!empty($def->doctype->dtdPublic) || !empty($def->doctype->dtdSystem)) {
            $ret .= '<!DOCTYPE html ';
            if (!empty($def->doctype->dtdPublic)) {
                $ret .= 'PUBLIC "' . $def->doctype->dtdPublic . '" ';
            }
            if (!empty($def->doctype->dtdSystem)) {
                $ret .= '"' . $def->doctype->dtdSystem . '" ';
            }
            $ret .= '>';
        }

        $ret .= '<html><head>';
        $ret .= '<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />';
        // No protection if $html contains a stray </div>!
        $ret .= '</head><body>' . $html . '</body></html>';
        return $ret;
    }
protected function wrapHTML ( $ html , $ config , $ context ) { $ def = $ config -> getDefinition ( 'HTML' ) ; $ ret = '' ; if ( ! empty ( $ def -> doctype -> dtdPublic ) || ! empty ( $ def -> doctype -> dtdSystem ) ) { $ ret .= '<!DOCTYPE html ' ; if ( ! empty ( $ def -> doctype -> dtdPublic ) ) { $ ret .= 'PUBLIC "' . $ def -> doctype -> dtdPublic . '" ' ; } if ( ! empty ( $ def -> doctype -> dtdSystem ) ) { $ ret .= '"' . $ def -> doctype -> dtdSystem . '" ' ; } $ ret .= '>' ; } $ ret .= '<html><head>' ; $ ret .= '<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />' ; // No protection if $html contains a stray </div>!
 $ ret .= '</head><body>' . $ html . '</body></html>' ; return $ ret ; }
Wraps an HTML fragment in the necessary HTML
@param string $html
@param HTMLPurifier_Config $config
@param HTMLPurifier_Context $context
@return string
Wraps an HTML fragment in the necessary HTML