[ZPT] escaping chars in tal

Thomas Olsen tol@tanghus.dk
Wed, 23 May 2001 12:23:00 +0200


Hi I'm trying to set the attributes in a meta tag. I have tried:

<meta http-equiv="refresh" content="dummy" tal:attributes="content
python:('%s; URL=%s' % (here.refreshrate, here.absolute_url()))">
<meta http-equiv="refresh" content="dummy" tal:attributes="content
string:python:('%s%s%s' % (here.refreshrate, '; URL=',
here.absolute_url()))">
<meta http-equiv="refresh" content="dummy" tal:attributes="content
python:('%s; URL=%s' % (here.refreshrate, here.absolute_url()))">

and other variation of this but to no avail. Every time there is a semi
colon or an equality sign in the expression Zope barfs saying something
like:
Products.PageTemplates.TALES.CompilerError: invalid variable name
"absolute_url()))"

If I try without the semi color or equality sign it works OK?
-- 
Thomas Olsen
Programmer
Icon Medialab, Denmark
Havnegade 39, 3-5 sal.
DK-1058 Copenhagen K

Icon Office  :  +45 70 23 10 01
Icon Fax     :  +45 33 32 02 09
Email        :  thomas@iconmedialab.dk,tanghus@kde.org

http://www.iconmedialab.com - http://www.tanghus.dk

Do not meddle in the affairs of programmers, for they are easy to annoy,
and have all the source code!!!