J M Cerqueira Esteves wrote:
> I just noticed a problem with the `tag' method:
> If I insert an image with
> <dtml-var "some_image.tag (border='0', alt='')">
> (nice because `width' and `height' are inserted automatically), I get an
> <img> element with NO `alt' attribute, instead of an `alt' atribute with
> an empty string as its value (alt="").
> An empty `alt' value is important when using images for which it is best
> not to insert any alternative text in text browsers (decoration-only or
> redundant image links, for instance), because the absence of the `alt'
> attribute may not be equivalent to an empty value. In lynx, for example,
> the file name of the image (more precisely, the last component of the
> path in the `src' attribute) is shown (yuck) when no `alt' attribute is
I assume the check for the attribute is only something like that:
So an empty string is considered also false.
You can work around with
<dtml-var "some_image.tag(border='0',alt=' ')">
Since a space is not seen but also not false.
Zope maillist - [EMAIL PROTECTED]
** No cross posts or HTML encoding! **
(Related lists -