0
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-01-03 05:11:52 +00:00

Update documentation.

git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1067 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
Edward Z. Yang 2007-05-17 18:36:39 +00:00
parent a846f4e70b
commit e4e981b6f1
7 changed files with 30 additions and 45 deletions

View File

@ -1,5 +1,6 @@
Configuration Configuration
[needs updating]
Configuration is documented on a per-use case: if a class uses a certain Configuration is documented on a per-use case: if a class uses a certain
value from the configuration object, it has to define its name and what the value from the configuration object, it has to define its name and what the

View File

@ -114,6 +114,10 @@ Partially presentational - table.cellpadding, table.cellspacing,
== CSS Risk Analysis == == CSS Risk Analysis ==
Currently, there is no support for fine-grained "allowed CSS" specification,
mainly because I'm lazy, partially because no one has asked for it. However,
this will be added eventually.
There are certain CSS elements that are extremely useful inline, but then There are certain CSS elements that are extremely useful inline, but then
as you get to more presentation oriented styling it may not always be as you get to more presentation oriented styling it may not always be
appropriate to inline them. appropriate to inline them.

View File

@ -1,37 +1,18 @@
Loose versus Strict Loose versus Strict
Changes from one doctype to another [rename/deprecation pending]
There are changes. Wow, how insightful. Not everything changed is relevant The most common change between doctypes are between the two flavors of HTML 4.01 and
to HTML Purifier, though, so let's take a look: XHTML 1.0: Transitional (Loose) and Strict. Besides deprecated attributes and elements
(which are quite easy to identify), there are two content model changes that were
made:
== Major incompatibilities == BLOCKQUOTE changes from 'flow' to 'block'
[done] BLOCKQUOTE changes from 'flow' to 'block'
current behavior: inline inner contents should not be nuked, block-ify as necessary current behavior: inline inner contents should not be nuked, block-ify as necessary
[partially-done] U, S, STRIKE cut ADDRESS from potpourri to Inline (removes p tags)
current behavior: removed completely
projected behavior: replace with appropriate inline span + CSS
[done] ADDRESS from potpourri to Inline (removes p tags)
current behavior: block tags silently dropped current behavior: block tags silently dropped
ideal behavior: replace tags with something like <br>. (not high priority) ideal behavior: replace block elements with something like <br>. (not high priority,
somewhat difficult to implement)
== Things we can loosen up == We're missing strict support for U, S, STRIKE: this needs to be fixed soon (and
is quite simple to fix).
Tags DIR, MENU, CENTER, ISINDEX, FONT, BASEFONT? allowed in loose
current behavior: transform to strict-valid forms
Attributes allowed in loose (see attribute transforms in 'dev-progress.html')
current behavior: projected to transform into strict-valid forms
== Periphery issues ==
A tag's attribute 'target' (for selecting frames) cut
current behavior: not allowed at all
projected behavior: use loose doctype if needed, needs valid values
[done] OL/LI tag's attribute 'start'/'value' (for renumbering lists) cut
current behavior: no substitute, just delete when in strict, allow in loose
Attribute 'name' deprecated in favor of 'id'
current behavior: dropped silently
projected behavior: create proper AttrTransform
[done] PRE tag allows SUB/SUP? (strict dtd comment vs syntax, loose disallows)
current behavior: disallow as usual

View File

@ -18,5 +18,7 @@ HTML Purifier context.
<listing>, monospace pre-variant (extremely rare) <listing>, monospace pre-variant (extremely rare)
<plaintext>, escapes all tags to the end of document <plaintext>, escapes all tags to the end of document
<ruby> and friends, (more research needed, appears to be XHTML 1.1 markup)
<xmp>, monospace, replace with pre <xmp>, monospace, replace with pre
These should be put into their own Tidy module, not loaded by default(?). These
all qualify as "lenient" transforms.

View File

@ -1,6 +1,6 @@
Is HTML Purifier Strict or Transitional? Is HTML Purifier Strict or Transitional?
A little bit of helpful guidance [rename/deprecation pending]
Despite the fact that HTML Purifier professes to support both transitional and Despite the fact that HTML Purifier professes to support both transitional and
strict HTML, it rejects a lot of attributes and elements that are actually, indeed, strict HTML, it rejects a lot of attributes and elements that are actually, indeed,
@ -21,17 +21,13 @@ allows them anyway and 2. older browsers support them better? After all, the
whole point about CSS is to seperate styling from content, so inline styling whole point about CSS is to seperate styling from content, so inline styling
doesn't solve that problem. doesn't solve that problem.
It's an icky question, and we'll have to deal with it as more and more [new material]
transforms get implemented. As of right now, however, we currently support
these loose-only constructs in loose mode:
- <ul start="1">, <li value="1"> attributes HTML Purifier 1.7 creates a new organizational system for deprecated attribute/
- <u>, <strike>, <s> tags element transformations. They will be unified under the title of "Tidy", which
- flow children in <blockquote> is what they are: cleaning up after deprecated user markup into standards-compliant
- mixed children in <address> versions. There will also be a change in the default behavior (athough, to the
end user not inspecting the HTML, there will be no change: in fact, it may
The changed child definitions as well as the ul.start li.value are the most work even better).
compelling reasons why loose should be used. We may want offer disabling <u>,
<strike> and <s> by themselves. We may also want to offer no pre-emptive
deprecated conversions. This all must be unified.
Consult the Advanced API for more details.

View File

@ -6,4 +6,4 @@ I don't think we need to worry about them. Untrusted users shouldn't be
submitting applications, eh? But if some interesting attribute pops up in submitting applications, eh? But if some interesting attribute pops up in
their spec, and might be worth supporting, stick it here. their spec, and might be worth supporting, stick it here.
(none so far, as you can see) HTML 5!!!

View File

@ -1,5 +1,6 @@
XHTML 1.1 and HTML Purifier XHTML 1.1 and HTML Purifier
[needs updating, most of this is implemented]
Todo for XHTML 1.1 support <http://www.w3.org/TR/xhtml11/changes.html> Todo for XHTML 1.1 support <http://www.w3.org/TR/xhtml11/changes.html>
1. Scratch lang entirely in favor of xml:lang 1. Scratch lang entirely in favor of xml:lang