getHTMLDefinition(true); $module = new HTMLPurifier_HTMLModule(); $module->name = 'Marquee'; $module->info['marquee'] = new HTMLPurifier_ElementDef(); $module->info['marquee']->content_model = '#PCDATA | Inline'; $module->info['marquee']->content_model_type = 'optional'; $module->content_sets = array('Inline' => 'marquee'); $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 ''; ?>
HTML Purifier claims to have a robust yet permissive whitelist: this page will allow you to see precisely what HTML Purifier's internal whitelist is. You can also twiddle with the configuration settings to see how a directive influences the internal workings of the definition objects.
You can specify an array by typing in a comma-separated list of items, HTML Purifier will take care of the rest (including transformation into a real array list or a lookup table).
<element> <?php echo $html
?> </element>
. The parent in this example
is element
.ul
don't allow text in them, so
#PCDATA is missing.font
turns into a span
tag with appropriate CSS.lang
and xml:lang
use this hook, to synchronize each other's values. Pre/Post indicates
whether or not the transform is done before/after validation.