> Betreff: [Zope-dev] ZPT attributes and ""
> Currently, if an attribute expression evaluates to any value
> that's boolean False, it's omitted (e.g. 0, "", object()). I
> think that's unexpected. Instead, attributes should only be
> omitted when the expression evaluates to ``None``.
I think this is better then render empty strings. see below...
> How do folks feel about changing this behavior in
Probably anything else then "" should be skipped. There is no
logic why object() or False should get rendered as "".
I only whould expect that an empty string whould get rendered
as "". And probably we should check the HTML specification and
make sure that we only render empty strings for attributes where
they are allowed.
ID and NAME tokens must begin with a letter ([A-Za-z]) and
may be followed by any number of letters, digits ([0-9]),
hyphens ("-"), underscores ("_"), colons (":"), and periods (".").
This means to me that an empty value for id or name
doen't start with [A-Za-z] and is invalid because is must start
with [A-Za-z]. or not?
> Zope-Dev maillist - Zope-Dev@zope.org
> ** No cross posts or HTML encoding! ** (Related lists -
> http://mail.zope.org/mailman/listinfo/zope )
Zope-Dev maillist - Zope-Dev@zope.org
** No cross posts or HTML encoding! **
(Related lists -