[ZPT] I don't want "&" to be URL escaped in tal:attributes, how to do?

Evan Simpson evan@zope.com
Wed, 16 Jan 2002 11:30:34 -0500


Jeff Peterson wrote:
> We ran into this problem on a project just last week.  We were unable to
> find a way to actually "escape" the ampersand but we were able to work
> around it using simple direct traversal.  This may or may not be useful to
> you but it worked for us so I thought I would at least mention it
> 
>>From: zpt-admin@zope.org [mailto:zpt-admin@zope.org]On Behalf Of
>>iap@y2fun.com
>>I want to render a URL by tal:attributes:
>><a href="" tal:attributes="href python:
>>here.absolute_url()+'?var1=A&var2=B'">
>>the & in '?var1=A&var2=B' will be "escaped" to &amp;
>>That make unexpected URL to be generated,
>>How to keep "&" to be "&" not "&amp;"
This is now in the FAQ, at:

http://dev.zope.org/Wikis/DevSite/Projects/ZPT/FAQ#15

Cheers,

Evan @ Zope