TAL uses double chars to escape especial characters, so to include a semi-colon you should use ';;' (without the quotes).
If I remember correctly to define a string you don't need to use the php: modifier but string: or simply enclose the string in single quotes. <span tal:attributes="class 'green;; blue'; style 'background: red;; color: white'></span> ciao, Iván On Thu, Feb 28, 2008 at 12:03 AM, Wallace McGee <[EMAIL PROTECTED]> wrote: > Hi ppl, my first post on the mailing list. > > Its always useful setting attributes with tal:attribute but I have yet > to work out how to include a semi-colon in the attribute value (useful > for setting onclick javascript code etc..) > > <span tal:attributes = " class php:'message'; my_element php:'green' " > >This works</span> > > <span tal:attributes = " class php:'message'; my_element > php:'green;black' " >This does not work</span> > > I have tried escaping the ; in the string but that broke phptal. > > I tried doubling the ; and I ended up with my_element="green;;black" > > Any suggestions? > > The same goes for how to get double quotes in to a string (again for > adding javascript): > > <span tal:attributes = " class php:'message'; my_element > php:'green="black"' " >This does not work</span> > > > _______________________________________________ > PHPTAL mailing list > PHPTAL@lists.motion-twin.com > http://lists.motion-twin.com/mailman/listinfo/phptal > _______________________________________________ PHPTAL mailing list PHPTAL@lists.motion-twin.com http://lists.motion-twin.com/mailman/listinfo/phptal