validate (); if (isset ( $_GET ['doc'] )) { // Hijack page generation to supply documentation if (file_exists ( 'test-schema.html' ) && ! isset ( $_GET ['purge'] )) { echo file_get_contents ( 'test-schema.html' ); exit (); } $style = 'plain'; $configdoc_xml = 'test-schema.xml'; $xml_builder = new HTMLPurifier_ConfigSchema_Builder_Xml (); $xml_builder->openURI ( $configdoc_xml ); $xml_builder->build ( $interchange ); unset ( $xml_builder ); // free handle $xslt = new ConfigDoc_HTMLXSLTProcessor (); $xslt->importStylesheet ( "../configdoc/styles/$style.xsl" ); $xslt->setParameters ( array ( 'css' => '../configdoc/styles/plain.css' ) ); $html = $xslt->transformToHTML ( $configdoc_xml ); unlink ( 'test-schema.xml' ); file_put_contents ( 'test-schema.html', $html ); echo $html; exit (); } ?> HTML Purifier Config Form Smoketest

HTML Purifier Config Form Smoketest

This file outputs the configuration form for every single type of directive possible.

build ( $interchange ); $config = HTMLPurifier_Config::loadArrayFromForm ( $_GET, 'config', true, true, $schema ); $printer = new HTMLPurifier_Printer_ConfigForm ( 'config', '?doc#%s' ); echo $printer->render ( array ( HTMLPurifier_Config::createDefault (), $config ) ); ?>
getAll (), true ) );
?>