[ZCM] [ZC] 585/ 2 Reject "ZPT doesn't handle strings in python expressions due to ignoring quotes"
Collector: Zope Bugs, Features, and Patches ...
zope-coders@zope.org
Wed, 25 Sep 2002 12:37:17 -0400
Issue #585 Update (Reject) "ZPT doesn't handle strings in python expressions due to ignoring quotes"
Status Rejected, Zope/bug medium
To followup, visit:
http://collector.zope.org/Zope/585
==============================================================
= Reject - Entry #2 by evan on Sep 25, 2002 12:37 pm
Status: Pending => Rejected
The problem here isn't the quotes -- it is the semicolon. All semicolons in a tal:attributes expression must be escaped by doubling, since single semicolons are used to separate attribute assignments. The correct form is:
tal:attributes="style python:'position: absolute;; background: %s;; left: %s px;; top: %s px' % (10,10,10,10)"
________________________________________
= Request - Entry #1 by Anonymous User on Sep 24, 2002 12:29 am
If I have an expression such as
<b tal:attributes="
style python:'position: absolute; background: %s; left: %s px; top: %s px' % (10,10,10,10)">
The parser doesn't like it. It is reading the semicolon as the end of the expression even though it's in a quotes and giving an error that %s is an illegal variable.
==============================================================