[Zope] prevent quoting in tal:attributes
Milos Prudek
prudek at bvx.cz
Fri Sep 12 13:19:28 EDT 2003
How can I prevent quote escaping in tal:attributes? My attribute
contains many quotes itself, and ZPT automatically escapes them.
Details:
I want to calculate the onMouseOver attribute of <img>. This is the
desired result:
onMouseOver="MM_swapImage('usability', '', '/usability_on_cs.gif',0)"
You see that there are many quotes... This is the Python Script excerpt
which calculates the onMouseOver string:
## 'name' and 'url_on' are properly calculated...
item['onmouseover']='MM_swapImage("' +name+ '", "", "' +url_on+ '", 0)'
The result of this when rendered via ZPT is this:
onmouseover="MM_swapImage("contacts", "",
"/contacts_on_cs.gif", 0)"
I need to change those " back to single quotes. In tal:replace I
could use the "structure" modifier, but it does not work for tal:attributes.
--
Milos Prudek
_________________
Most websites are
confused chintzy gaudy conflicting tacky unpleasant... unusable.
Learn how usable YOUR website is! http://www.spoxdesign.com
More information about the Zope
mailing list