1
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-08-06 22:26:31 +02:00

[1.7.0] Create ConfigForm printer classes

- Extend hash to convert strings from form key,value,key,value
- Hack up configdoc to accommodate configForm.php smoketest

git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1101 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
Edward Z. Yang
2007-05-28 02:20:55 +00:00
parent ee61ffc0d9
commit ef51f8681a
14 changed files with 398 additions and 18 deletions

View File

@@ -28,9 +28,9 @@ class HTMLPurifier_Printer
/**
* Main function that renders object or aspect of that object
* @param $config Configuration object
* @note Parameters vary depending on printer
*/
function render($config) {}
// function render() {}
/**
* Returns a start tag
@@ -66,6 +66,18 @@ class HTMLPurifier_Printer
$this->end($tag);
}
function elementEmpty($tag, $attr = array()) {
return $this->generator->generateFromToken(
new HTMLPurifier_Token_Empty($tag, $attr)
);
}
function text($text) {
return $this->generator->generateFromToken(
new HTMLPurifier_Token_Text($text)
);
}
/**
* Prints a simple key/value row in a table.
* @param $name Key