[ZPT] Re: [Zope] prevent quoting in tal:attributes
Jamie Heilman
jamie at audible.transient.net
Thu Oct 2 18:37:54 EDT 2003
Evan Simpson wrote:
> <form method="GET">
> <input name="units" value="€"
> title="default is €"
> tal:attributes="value request/units | default" />
> <input type="submit" value="Convert to €"
> tal:define="units request/units | string:"
> tal:attributes="value python:test(units, 'Convert to '+units,
> default)" />
> </form>
>
> Under the old system, macro expansion and execution will both mangle the
> 'value' attributes, but not 'title', since it isn't dynamic.
Thats an unfortunate bug, presumeably due to the way in which
value="€" (which *appears* static) and tal:attributes="value ..."
(clearly dynamic) are collapsed into a single dynamic statement by the
TAL generator (just a guess). But thats no reason to go and break
entity quoting for all dynamicaly generated attributes, this is one of
those times the cure is worse than the ailment.
--
Jamie Heilman http://audible.transient.net/~jamie/
More information about the ZPT
mailing list