[ZPT] URL quoting in ZPT

Shane Hathaway shane@zope.com
Thu, 29 Aug 2002 17:12:46 -0400


I just ran into a puzzling little issue.  Let's say I want to construct 
an URL with a query string like this in ZPT:

<a tal:attributes="href string:${here/absolute_url}?id=${myid}">Go</a>

The problem is that while "here/absolute_url" gets URL quoted as it 
should, "myid" does not.  If the value of myid contains a space or some 
other disallowed character, some browsers (like MSIE) will break.

So there must be some simple way to get a string url_quoted, but I can't 
think of what it would be.  Any suggestions?

Shane