diff --git a/docs/dev-advanced-api.html b/docs/dev-advanced-api.html index 731397f2..c19a84cc 100644 --- a/docs/dev-advanced-api.html +++ b/docs/dev-advanced-api.html @@ -29,7 +29,7 @@ filtersets: therefore, users must be able to define their own sets of
$config->set('HTML', 'Doctype', 'XHTML 1.0 Transitional');+
Due to legacy, the default option is XHTML 1.0 Transitional, however, we +really shouldn't be guessing what the user's doctype is. Fortunantely, +people who can't be bothered to set this won't be bothered when their +pages stop validating.
+However, selecting this doctype doesn't mean much, because if we @@ -131,7 +136,14 @@ Currently, we have two modes, which may be used together:
Further investigation in this field is necessary.
-With regards to the various levels of operation conjectured in the
+Correctional mode, this is prompted by the fact that a user may want to
+correct certain problems but not others, for example, fix the center
+tag but not the u
tag, both of which are deprecated.
+Having an integer level
will not work very well for such fine
+grained tweaking, but an array of specific settings might.
If this cookie cutter approach doesn't appeal to a user, they may decide to roll their own filterset by selecting modules, tags and @@ -143,35 +155,42 @@ as a filterset author would use, except that it would go under an relevant module/tag/attribute selection configuration directives were non-null.
-On the highest level, a user will usually be most interested in -directly specifying which elements and attributes are desired. For -example:
+In practice, this is the most commonly demanded feature. Most users are +perfectly happy defining a filterset that looks like:
-$config->set('HTML', 'AllowedElements', 'a,b,em,p,blockquote,code,i');+
$config->setAllowedHTML('a[href,title],em,p,blockquote');-
Attribute declarations could be merged into this declaration as such:
+We currently support a separated interface, which also must be preserved:
-$config->set('HTML', 'Allowed', 'a[href,title],b,em,p[class],blockquote[cite],code,i');+
$config->set('HTML', 'AllowedTags', 'a,em,p,blockquote'); +$config->set('HTML', 'AllowedAttributes', 'a.href,a.title');-
...or be kept separate:
+The directive %HTML.Allowed is a convenience function +that may be fully expressed with the legacy interface, and thus is +given its own setter.
-$config->set('HTML', 'AllowedAttributes', 'a.href,a.title,p.class,blockquote.cite');+
A user may also choose to allow modules:
-Considering that, internally speaking, as mandated by -the XHTML 1.1 Modularization specification, we have organized our -elements around modules, considerable gymnastics will be needed to -get this sort of functionality working.
+$config->set('HTML', 'AllowedModules', 'Hypertext,Text,Lists'); // or +$config->setAllowedHTML('Hypertext,Text,Lists');-
A user may also specify a module to load a class of elements and attributes -into their filterest:
- -$config->set('HTML', 'Allowed', 'Hypertext,Core');+
But it is not expected that this feature will be widely used.
The granularity of these modules is too coarse for
the average user (for example, the core module loads everything from
the essential p
tag to the not-so-safe h1
tag). How do we make this still a viable solution?
Modules are distinguished from regular tags by the +case of their first letter. While XML distinguishes between lower and uppercase +letters, in practice, most well-known XML languages use only lower-case +tag names for sake of consistency.
+ +Considering that, internally speaking, as mandated by +the XHTML 1.1 Modularization specification, we have organized our +elements around modules, considerable gymnastics will be needed to +get this sort of functionality working.
+Because selecting each and every one of these configuration options