2006-11-22 04:49:26 +00:00
|
|
|
|
|
|
|
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 ==
|
|
|
|
|
2006-11-23 03:23:35 +00:00
|
|
|
[done] BLOCKQUOTE changes from 'flow' to 'block'
|
2006-11-22 04:49:26 +00:00
|
|
|
behavior: inline inner contents should not be nuked, paragraph as necessary
|
2006-11-23 03:23:35 +00:00
|
|
|
[partially-done] U, S, STRIKE cut
|
2006-11-22 04:49:26 +00:00
|
|
|
behavior: replace with appropriate inline span + CSS
|
2006-11-23 03:23:35 +00:00
|
|
|
[partially-done] ADDRESS from potpourri to Inline (removes p tags) (lower importance)
|
2006-11-22 18:17:39 +00:00
|
|
|
behavior: p tags silently dropped or replaced with something (<br>)
|
2006-11-22 04:49:26 +00:00
|
|
|
|
|
|
|
== 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'
|
2006-11-23 03:23:35 +00:00
|
|
|
behavior: not allowed in first place, but create proper AttrTransform
|
2006-11-22 04:49:26 +00:00
|
|
|
PRE tag allows SUB/SUP? (strict dtd comment vs syntax, loose disallows)
|
2006-11-23 03:23:35 +00:00
|
|
|
behavior: disallow as usual
|