phptal / PHPTAL

PHP Template Attribute Language — template engine for XSS-proof well-formed XHTML and HTML5 pages
http://phptal.org
GNU Lesser General Public License v2.1
175 stars 43 forks source link

Dom lists need to be updated #10

Closed ajcrites closed 11 years ago

ajcrites commented 12 years ago

The Dom/Defs XHTML::EMPTY_TAGS and XHTML_BOOLEAN_ATTRIBUTES lists need to be updated for HTML5.

The full list of empty content model elements in HTML5 is:

base
link
meta
hr
br
wbr
img
embed
param
source
track
area
colgroup /* only if the span attribute is present */
col
input
keygen
command

PHPTAL already has special handling for these elements in XHTML output mode, so I think we should just update the list sans colgroup, which will need special handling.

As for the boolean attributes list:

checked
disabled
autoplay
async
autofocus
controls
default
defer
formnovalidate
hidden
ismap
itemscope
loop
multiple
novalidate
open
pubdate
readonly
required
reversed
scoped
seamless
selected

The current attribute list also includes some obsoleted (in HTML5) attributes, but I think these might as well stay for compatibility and can be removed in another version.

tanakahisateru commented 12 years ago

I'm planning to work for above in html5_with_ns branch.

tanakahisateru commented 11 years ago

Fixed in #12 .