20 $this->def =
$config->getHTMLDefinition();
22 $ret .= $this->
start(
'div', array(
'class' =>
'HTMLPurifier_Printer'));
40 $doctype = $this->def->doctype;
44 $ret .= $this->
row(
'Name', $doctype->name);
45 $ret .= $this->
row(
'XML', $doctype->xml ?
'Yes' :
'No');
46 $ret .= $this->
row(
'Default Modules', implode($doctype->modules,
', '));
47 $ret .= $this->
row(
'Default Tidy Modules', implode($doctype->tidyModules,
', '));
66 $ret .= $this->
row(
'Parent of fragment',
$def->info_parent);
68 $ret .= $this->
row(
'Block wrap name',
$def->info_block_wrapper);
78 foreach (
$def->info_tag_transform as $old => $new) {
79 $new = $this->
getClass($new,
'TagTransform_');
80 $list[] =
"<$old> with $new";
108 foreach ($this->def->info_content_sets as $name => $lookup) {
126 $ret .= $this->
element(
'caption',
'Elements ($info)');
127 ksort($this->def->info);
132 foreach ($this->def->info as $name =>
$def) {
134 $ret .= $this->
element(
'th',
"<$name>", array(
'class' =>
'heavy',
'colspan' => 2));
138 $ret .= $this->
element(
'td',
$def->descendants_are_inline ?
'Yes' :
'No');
140 if (!empty(
$def->excludes)) {
146 if (!empty(
$def->attr_transform_pre)) {
152 if (!empty(
$def->attr_transform_post)) {
154 $ret .= $this->
element(
'th',
'Post-AttrTransform');
158 if (!empty(
$def->auto_close)) {
165 $ret .= $this->
element(
'th',
'Allowed attributes');
169 if (!empty(
$def->required_attr)) {
191 if (isset(
$def->elements)) {
192 if (
$def->type ==
'strictblockquote') {
193 $def->validateChildren(array(), $this->config, $context);
195 $elements =
$def->elements;
197 if (
$def->type ==
'chameleon') {
198 $attr[
'rowspan'] = 2;
199 } elseif (
$def->type ==
'empty') {
201 } elseif (
$def->type ==
'table') {
202 $elements = array_flip(
214 $ret .= $this->
element(
'th',
'Allowed children', $attr);
216 if (
$def->type ==
'chameleon') {
229 '<em>Inline</em>: ' .
235 } elseif (
$def->type ==
'custom') {
239 '<em>' . ucfirst(
$def->type) .
'</em>: ' .
246 '<em>' . ucfirst(
$def->type) .
'</em>: ' .
247 $this->escape($this->listifyTagLookup($elements)),
265 foreach ($array as $name => $discard) {
266 if ($name !==
'#PCDATA' && !isset($this->def->info[$name])) {
284 foreach ($array as $obj) {
285 $list[] = $this->
getClass($obj,
'AttrTransform_');
299 foreach ($array as $name => $obj) {
300 if ($obj ===
false) {
303 $list[] =
"$name = <i>" . $this->
getClass($obj,
'AttrDef_') .
'</i>';
318 $ret .= $this->
element(
'th', $text, array(
'colspan' => $num,
'class' =>
'heavy'));