mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-01-18 11:41:52 +00:00
Commit two new docs: loose-vs-strict and proprietary-tags, both research/reference.
git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@554 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
parent
18a83acc5d
commit
224ef774f7
42
docs/ref-loose-vs-strict.txt
Normal file
42
docs/ref-loose-vs-strict.txt
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
|
||||||
|
Loose versus Strict
|
||||||
|
Changes from one doctype to another
|
||||||
|
|
||||||
|
There are changes. Wow, how insightful. Not everything changed is relevant
|
||||||
|
to HTML Purifier, though, so let's take a look:
|
||||||
|
|
||||||
|
== Major incompatibilities ==
|
||||||
|
|
||||||
|
BLOCKQUOTE changes from 'flow' to 'block'
|
||||||
|
behavior: inline inner contents should not be nuked, paragraph as necessary
|
||||||
|
U, S, STRIKE cut
|
||||||
|
behavior: replace with appropriate inline span + CSS
|
||||||
|
ADDRESS from potpourri to Inline (removes p tags)
|
||||||
|
behavior: p tags silently dropped or replaced with something
|
||||||
|
|
||||||
|
== Things we can loosen up ==
|
||||||
|
|
||||||
|
Tags DIR, MENU, CENTER, ISINDEX, FONT, BASEFONT? allowed in loose
|
||||||
|
Attributes allowed in loose:
|
||||||
|
div,p,h#.align
|
||||||
|
ul,ol.type
|
||||||
|
ul,ol,dl.compact
|
||||||
|
ol.start
|
||||||
|
li.type,value
|
||||||
|
hr.align,noshade,size,width
|
||||||
|
pre.width
|
||||||
|
img.name?,align,border,hspace,vspace
|
||||||
|
table.align,bgcolor
|
||||||
|
caption.align
|
||||||
|
tr.bgcolor
|
||||||
|
th,td.nowrap,bgcolor,width,height
|
||||||
|
|
||||||
|
== Periphery issues ==
|
||||||
|
|
||||||
|
A tag's attribute 'target' (for selecting frames) cut
|
||||||
|
behavior: shouldn't be needed, use loose doctype if needed
|
||||||
|
OL/LI tag's attribute 'start' (for renumbering lists) cut
|
||||||
|
behavior: no substitute, just delete
|
||||||
|
Attribute 'name' deprecated in favor of 'id'
|
||||||
|
behavior: create proper AttrTransform
|
||||||
|
PRE tag allows SUB/SUP? (strict dtd comment vs syntax, loose disallows)
|
19
docs/ref-proprietary-tags.txt
Normal file
19
docs/ref-proprietary-tags.txt
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
|
||||||
|
Proprietary Tags
|
||||||
|
<nobr> and friends
|
||||||
|
|
||||||
|
Here are some proprietary tags that W3C does not define but occasionally show
|
||||||
|
up in the wild. We have only included tags that would make sense in an
|
||||||
|
HTML Purifier context.
|
||||||
|
|
||||||
|
<align>, block element that aligns (extremely rare)
|
||||||
|
<blackface>, inline that double-bolds text (extremely rare)
|
||||||
|
<multicol>, multiple columns
|
||||||
|
<nobr>, no linebreaks
|
||||||
|
<spacer>, whitespace in doc
|
||||||
|
<wbr>, allows linebreaks
|
||||||
|
|
||||||
|
<listing>, monospace pre-variant (extremely rare)
|
||||||
|
<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
|
Loading…
Reference in New Issue
Block a user