1
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-08-06 14:16:32 +02:00

[3.1.0] Add support for deprecated and version in configdoc

- Hide deprecated elements from ToC
- %HTML.Doctype takes null instead of empty string; this shouldn't affect anyone

git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1666 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
Edward Z. Yang
2008-04-22 02:19:40 +00:00
parent 949f605857
commit 39be09ee14
12 changed files with 47 additions and 24 deletions

View File

@@ -70,6 +70,7 @@ class HTMLPurifier_ConfigSchema_Builder_Xml extends XMLWriter
$this->endElement(); // aliases
$this->startElement('constraints');
if ($directive->version) $this->writeElement('version', $directive->version);
$this->writeElement('type', $directive->type);
if ($directive->typeAllowsNull) $this->writeAttribute('allow-null', 'yes');
if ($directive->allowed) {
@@ -81,6 +82,13 @@ class HTMLPurifier_ConfigSchema_Builder_Xml extends XMLWriter
$this->writeAttribute('xml:space', 'preserve');
$this->endElement(); // constraints
if ($directive->deprecatedVersion) {
$this->startElement('deprecated');
$this->writeElement('version', $directive->deprecatedVersion);
$this->writeElement('use', $directive->deprecatedUse->toString());
$this->endElement(); // deprecated
}
$this->startElement('description');
$this->writeHTMLDiv($directive->description);
$this->endElement(); // description