0
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2024-12-23 00:41:52 +00:00

Minor tweaks to documentation and Enum (case-sensitivity is now boolean).

git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@128 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
Edward Z. Yang 2006-07-30 15:29:22 +00:00
parent f8eaedb500
commit 647ff26379
4 changed files with 14 additions and 2 deletions

View File

@ -6,7 +6,8 @@
Move to style! --> Move to style! -->
<!ENTITY % TextAlign "DEPRECATED align (left|center|right|justify) #IMPLIED"> <!ENTITY % TextAlign "DEPRECATED align (left|center|right|justify) #IMPLIED">
<!-- type and start should have CSS equivalents --> <!-- type and start should have CSS equivalents, but they'll need to
be translated intelligently -->
<!ENTITY % ULStyle "(disc|square|circle)"> <!ENTITY % ULStyle "(disc|square|circle)">
<!-- Ordered list numbering style <!-- Ordered list numbering style

View File

@ -385,6 +385,10 @@ These are the elements that only have %attrs:
These are the elements that only have %attrs and need an alignment transform These are the elements that only have %attrs and need an alignment transform
div, p, h1, h2, h3, h4, h5, h6 div, p, h1, h2, h3, h4, h5, h6
----
Prepend style transformations, as CSS takes precedence.
== PART 5 - stringify == == PART 5 - stringify ==
Status: A+ (done completely!) Status: A+ (done completely!)

View File

@ -9,6 +9,7 @@ class HTMLPurifier_AttrDef_Enum extends HTMLPurifier_AttrDef
function HTMLPurifier_AttrDef_Enum( function HTMLPurifier_AttrDef_Enum(
$valid_values = array(), $case_sensitive = false) { $valid_values = array(), $case_sensitive = false) {
$this->valid_values = array_flip($valid_values); $this->valid_values = array_flip($valid_values);
$this->case_sensitive = $case_sensitive; $this->case_sensitive = $case_sensitive;
} }

View File

@ -60,6 +60,8 @@ class HTMLPurifier_Definition
// and also know the assumptions the code makes about what this // and also know the assumptions the code makes about what this
// contains for optimization purposes (see fixNesting) // contains for optimization purposes (see fixNesting)
// child info
$e_special_extra = 'img'; $e_special_extra = 'img';
$e_special_basic = 'br | span | bdo'; $e_special_basic = 'br | span | bdo';
$e_special = "$e_special_basic | $e_special_extra"; $e_special = "$e_special_basic | $e_special_extra";
@ -153,6 +155,10 @@ class HTMLPurifier_Definition
$this->info['child']['a'] = $e_a_content; $this->info['child']['a'] = $e_a_content;
// attribute info
$a_dir = new HTMLPurifier_AttrDef_Enum(array('ltr','rtl'), false);
} }
} }