mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-08-16 19:13:58 +02:00
Cordon off configuration form values into one form element name.
git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1111 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
@@ -62,8 +62,8 @@ require_once 'HTMLPurifier/Printer/ConfigForm.php';
|
||||
require_once 'testSchema.php';
|
||||
|
||||
// cleanup ( this should be rolled into Config )
|
||||
$config = HTMLPurifier_Config::loadArrayFromForm($_GET);
|
||||
$printer = new HTMLPurifier_Printer_ConfigForm('?doc');
|
||||
$config = HTMLPurifier_Config::loadArrayFromForm($_GET, 'config');
|
||||
$printer = new HTMLPurifier_Printer_ConfigForm('config', '?doc#%s');
|
||||
echo $printer->render($config);
|
||||
|
||||
?>
|
||||
|
@@ -6,7 +6,7 @@ require_once 'HTMLPurifier/Printer/HTMLDefinition.php';
|
||||
require_once 'HTMLPurifier/Printer/CSSDefinition.php';
|
||||
require_once 'HTMLPurifier/Printer/ConfigForm.php';
|
||||
|
||||
$config = HTMLPurifier_Config::loadArrayFromForm($_GET);
|
||||
$config = HTMLPurifier_Config::loadArrayFromForm($_GET, 'config');
|
||||
|
||||
// you can do custom configuration!
|
||||
if (file_exists('printDefinition.settings.php')) {
|
||||
@@ -27,6 +27,11 @@ $html_definition->manager->addModule($module);
|
||||
$printer_html_definition = new HTMLPurifier_Printer_HTMLDefinition();
|
||||
$printer_css_definition = new HTMLPurifier_Printer_CSSDefinition();
|
||||
|
||||
$printer_config_form = new HTMLPurifier_Printer_ConfigForm(
|
||||
'config',
|
||||
'http://htmlpurifier.org/live/configdoc/plain.html#%s'
|
||||
);
|
||||
|
||||
echo '<?xml version="1.0" encoding="UTF-8" ?>';
|
||||
?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
@@ -69,8 +74,7 @@ transformation into a real array list or a lookup table).</p>
|
||||
|
||||
<form method="get" action="" name="hp-configform">
|
||||
<?php
|
||||
$printer = new HTMLPurifier_Printer_ConfigForm('http://htmlpurifier.org/live/configdoc/plain.html');
|
||||
echo $printer->render($config, 'HTML');
|
||||
echo $printer_config_form->render($config, 'HTML');
|
||||
?>
|
||||
<p>* Some configuration directives make a distinction between an empty
|
||||
variable and a null variable. A whitelist, for example, will take an
|
||||
|
Reference in New Issue
Block a user