[ZO-Coll] [ZOC] 327/ 1 Request "Need a way to include structure in
Collector: NEW Zope.org (the ...
zope-web at zope.org
Thu Apr 1 09:55:38 EST 2004
Issue #327 Update (Request) "Need a way to include structure in ZPT attributes"
Status Pending, functionality/bug medium
To followup, visit:
= Request - Entry #1 by salimfadhley on Apr 1, 2004 9:55 am
Sometimes we need to generate non-standard attributes, which while not being valid XML has some practical value when integrating Zope applications with other systems.
I am working on an application part-written in Zope that makes content for a mailing system to re-distribute. The mailing system takes HTML documents with some embedded TCL. I would like to be able to generate all of this using Zope and ZPT - the problem is the embedded TCL requires characters that ZPT will not allow in attributes.
How I am generating <a> tags:
<a href="webTi.html" tal:attributes="href python:here.pyscripts.uri(content_object)">click me</a>
Example of attribute I need to create:
<a href="%%track http://zope.hobo.hhub/demo/club_six/section?obj=section&id=6%20-name%20"Resistance%20training"%%">click me</a>
What actually happens:
<a href="%%track http://zope.hobo.hhub/demo/club_six/section?obj=section&id=6%20-name%20"Resistance%20training"%%">
ZPT is smart enough to know that an attribute should never contain a " (quote-mark) character, so it has tried to escape it to preserve sanity... however in this case it has done the wrong thing, I actually wanted the EXACT output of the function - no matter how bizzare it looks.
Could there be a modifier to tal:attributes, much like 'structure' when applied to tal:replace that prevents ZPT from escaping or otherwise fixing the data being applied to that attribute?
More information about the Zopeorg-collector