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

Reply via email to