W dniu 29.09.2010 11:53, Kornel Lesiński pisze:
Thanks for the test case — it was very helpful.

Short story: it's a bug.
Ok thanks for info. Until it's fixed, I'll use this dirty fix :).
When I change output mode to HTML5, PHPTAL generates broken html (no quotes 
around attributes values, does not matter if after clone or before) and does 
not change/validate doctype in layout.html. Is this normal?
Do you mean it's broken according to HTML5 specification, or broken because it 
doesn't look like XML? In HTML5 mode omitting of quotes is intentional and 
PHPTAL should omit them only in cases permitted in HTML5 text/html syntax.

On http://dev.w3.org/html5/spec/Overview.html#introduction they wrote:

////////////////////////////////////
Attributes are placed inside the start tag, and consist of a name and a value, separated by an "=" character. The attribute value can remain unquoted if it doesn't contain spaces or any of " ' ` = < or >. Otherwise, it has to be quoted using either single or double quotes. The value, along with the "=" character, can be omitted altogether if the value is the empty string.
<!-- empty attributes -->
<input name=address disabled>
<input name=address disabled="">

<!-- attributes with a value -->
<input name=address maxlength=200>
<input name=address maxlength='200'>
<input name=address maxlength="200">

//////////////////////////////////

Correct me if I'm wrong. They say that values with space or special chars must be quotes around. They don't say that quotes should be ommited everywhere else. Just mine interpretation :)


PHPTAL also is supposed to force DOCTYPE to be the only one allowed in HTML5 
(so you could have well-formed XHTML/1 with named entities as input and HTML5 
as output). If it doesn't do that, then I'd like to see a test case for it.

Ok I must have see it wrong :) PHPTAL is forcing doctype when in HTML5.

Thank you for help.

Regards
Piotr Kroczyński

_______________________________________________
PHPTAL mailing list
PHPTAL@lists.motion-twin.com
http://lists.motion-twin.com/mailman/listinfo/phptal

Reply via email to