mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2024-11-10 15:48:42 +00:00
0ea04db559
- Migrated most unit tests over to XHTML 1.0 Strict to preserve transformation behavior - Created %Core.ColorKeywords to be shared between CSS_Color and HTML_Color - Added AttrDef_HTML_Color as AttrType Color - HTMLPurifier_Config::create(HTMLPurifier_Config $config) now clones the object - Attribute minimization for HTML implemented in Generator - Move div@align fix from proprietary to regular set - Color keywords now map to full six digit hexadecimal codes - Harness will now tack on per-use-case configuration git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1084 48356398-32a2-884e-a903-53898d9a118a
23 lines
422 B
PHP
23 lines
422 B
PHP
<?php
|
|
|
|
require_once 'HTMLPurifier/AttrDef.php';
|
|
|
|
/**
|
|
* Validates a boolean attribute
|
|
*/
|
|
class HTMLPurifier_AttrDef_HTML_Bool extends HTMLPurifier_AttrDef
|
|
{
|
|
|
|
var $name;
|
|
var $minimized = true;
|
|
|
|
function HTMLPurifier_AttrDef_HTML_Bool($name) {$this->name = $name;}
|
|
|
|
function validate($string, $config, &$context) {
|
|
if (empty($string)) return false;
|
|
return $name;
|
|
}
|
|
|
|
}
|
|
|
|
?>
|