mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-08-01 11:50:28 +02:00
[2.0.1]
- Printer adheres to configuration's directives on output format - Fix improperly named form field in ConfigForm printer . HTMLPurifier_Config::getAllowedDirectivesForForm implemented, allows much easier selective embedding of configuration values . Doctype objects now accept public and system DTD identifiers . %HTML.Doctype is now constrained by specific values, to specify a custom doctype use new %HTML.CustomDoctype . ConfigForm truncates long directives to keep the form small, and does not re-output namespaces git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1232 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
@@ -26,6 +26,16 @@ class HTMLPurifier_Printer
|
||||
$this->generator = new HTMLPurifier_Generator();
|
||||
}
|
||||
|
||||
/**
|
||||
* Give generator necessary configuration if possible
|
||||
*/
|
||||
function prepareGenerator($config) {
|
||||
// hack for smoketests/configForm.php
|
||||
if (empty($config->conf['HTML'])) return;
|
||||
$context = new HTMLPurifier_Context();
|
||||
$this->generator->generateFromTokens(array(), $config, $context);
|
||||
}
|
||||
|
||||
/**
|
||||
* Main function that renders object or aspect of that object
|
||||
* @note Parameters vary depending on printer
|
||||
|
Reference in New Issue
Block a user