From 72f1984229a29b6ee5801d9d97c3d07aed254f34 Mon Sep 17 00:00:00 2001
From: "Edward Z. Yang"
Date: Mon, 12 Mar 2007 03:53:09 +0000
Subject: [PATCH] Add notes on "mode" to advanced API.
git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@801 48356398-32a2-884e-a903-53898d9a118a
---
docs/dev-advanced-api.html | 28 +++++++++++++++++++++++++++-
1 file changed, 27 insertions(+), 1 deletion(-)
diff --git a/docs/dev-advanced-api.html b/docs/dev-advanced-api.html
index 695c49c4..56dbeb04 100644
--- a/docs/dev-advanced-api.html
+++ b/docs/dev-advanced-api.html
@@ -27,7 +27,8 @@ filtersets: therefore, users must be able to define their own sets of
- Doctype
- Filtersets: Rich / Plain / Full ...
- - Collections: Safe / Unsafe / Leniency(?) / Corrections(?) [advanced]
+ - Mode: Lenient / Correctional
+ - Collections (?): Safe / Unsafe
- Modules / Tags / Attributes
Customize
@@ -88,6 +89,31 @@ other users to use.
$config->set('HTML', 'Filterset', 'Rich');
+Selecting Mode
+
+Within filtersets, there are various modes of operation.
+These indicate variant behaviors that, while not strictly changing the
+allowed set of elements and attributes, will definitely affect the output.
+Currently, we have two modes, which may be used together:
+
+
+ - Lenient
+ - Deprecated elements and attributes will be transformed into
+ standards-compliant alternatives when explicitly disallowed. For
+ example, in the XHTML 1.0 Strict doctype, a
center
+ tag would be turned into a div
with the CSS property
+ text-align:center;
, but in XHTML 1.0 Transitional
+ the tag would be preserved. This mode is on by default.
+ - Correctional
+ - Deprecated elements and attributes will be transformed into
+ standards-compliant alternatives whenever possible. Referring
+ back to the previous example, the
center
tag would
+ be transformed in both cases. However, tags without a
+ reasonable standards-compliant alternative will be preserved
+ in their form. This mode is on by default. It may have
+ various levels of operation.
+
+
Selecting Modules / Tags / Attributes
If this cookie cutter approach doesn't appeal to a user, they may