[Zope-dev] How to put "<", ">" in HTML attributes?

Christian Theune ct at gocept.com
Thu Aug 21 07:44:29 EDT 2008


On Thu, 2008-08-21 at 13:30 +0200, Hermann Himmelbauer wrote:
> Yes, many thanks for that, this did the trick! Interestingly, something like 
> this did not work::
> 
> def attrcode(self):
> 	return '<broken>'
> 
> <input value="" tal:attributes="value view/attrcode" />

Of course not. The quoting happens because of tal:attributes. Just
moving the `python:...` statement into the view code doesn't make a
structural difference.

What makes it work is the `structure` prefix on the tal:replace part
which doesn't touch the result of the evaluation.

Christian

-- 
Christian Theune · ct at gocept.com
gocept gmbh & co. kg · forsterstraße 29 · 06112 halle (saale) · germany
http://gocept.com · tel +49 345 1229889 7 · fax +49 345 1229889 1
Zope and Plone consulting and development
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://mail.zope.org/pipermail/zope-dev/attachments/20080821/acca60d5/attachment.bin 


More information about the Zope-Dev mailing list