[Zope] Re: using a variable plus attribute inside a DTML-CALL
Bak @ kedai
kedai@kedai.com.my
Thu, 4 Oct 2001 22:38:28 +0800
>> <dtml-call
>>
expr="RESPONSE.redirect('http://www.zope.org/SiteIndex/search?text_content='
>> + arg)">
>>
>> However, I want to url_quote_plus the arg. The usual variable
>>attribute syntax (either <dtml-var
create a Script(python)
#id: myquote.
#parameters x
#special_formats, whole_dollars, dollars_and_cents, structured_text,
sql_quote, html_quote, url_quote, url_quote_plus, newline_to_br,
thousands_commas
from Products.PythonScripts.standard import url_quote_plus
return url_quote_plus(x)
<dtml-call
expr="RESPONSE.redirect('http://www.zope.org/SiteIndex/search?text_content='
+ myquote(arg))">
hth