diff --git a/library/HTMLPurifier/Printer/ConfigForm.php b/library/HTMLPurifier/Printer/ConfigForm.php index 31da35f8..ebe040a7 100644 --- a/library/HTMLPurifier/Printer/ConfigForm.php +++ b/library/HTMLPurifier/Printer/ConfigForm.php @@ -25,7 +25,9 @@ class HTMLPurifier_Printer_ConfigForm extends HTMLPurifier_Printer /** * Whether or not to compress directive names, clipping them off - * after a certain amount of letters + * after a certain amount of letters. False to disable or integer letters + * before clipping. + * @protected */ var $compress = false; @@ -41,11 +43,13 @@ class HTMLPurifier_Printer_ConfigForm extends HTMLPurifier_Printer $this->docURL = $doc_url; $this->name = $name; $this->compress = $compress; + // initialize sub-printers $this->fields['default'] = new HTMLPurifier_Printer_ConfigForm_default(); $this->fields['bool'] = new HTMLPurifier_Printer_ConfigForm_bool(); } /** + * Sets default column and row size for textareas in sub-printers * @param $cols Integer columns of textarea, null to use default * @param $rows Integer rows of textarea, null to use default */ @@ -55,15 +59,14 @@ class HTMLPurifier_Printer_ConfigForm extends HTMLPurifier_Printer } /** - * Retrieves styling, in case the directory it's in is not publically - * available + * Retrieves styling, in case it is not accessible by webserver */ function getCSS() { return file_get_contents(HTMLPURIFIER_PREFIX . '/HTMLPurifier/Printer/ConfigForm.css'); } /** - * Retrieves JavaScript, in case directory is not public + * Retrieves JavaScript, in case it is not accessible by webserver */ function getJavaScript() { return file_get_contents(HTMLPURIFIER_PREFIX . '/HTMLPurifier/Printer/ConfigForm.js'); diff --git a/library/HTMLPurifier/Printer/HTMLDefinition.php b/library/HTMLPurifier/Printer/HTMLDefinition.php index 52650c63..4a0a90f1 100644 --- a/library/HTMLPurifier/Printer/HTMLDefinition.php +++ b/library/HTMLPurifier/Printer/HTMLDefinition.php @@ -102,6 +102,7 @@ class HTMLPurifier_Printer_HTMLDefinition extends HTMLPurifier_Printer $ret .= $this->element('td', $this->listifyTagLookup($lookup)); $ret .= $this->end('tr'); } + $ret .= $this->end('table'); return $ret; } @@ -179,7 +180,8 @@ class HTMLPurifier_Printer_HTMLDefinition extends HTMLPurifier_Printer $def->validateChildren(array(), $this->config, $context); } $elements = $def->elements; - } elseif ($def->type == 'chameleon') { + } + if ($def->type == 'chameleon') { $attr['rowspan'] = 2; } elseif ($def->type == 'empty') { $elements = array();