New feature: A TWiki-based application that composes a URL with parameters needs to encode the URL string.
Documented in
TWikiVariables:
%URLENCODE{"string"}% |
Encodes a string for use as a URL parameter. Ex: %URLENCODE{"spaced name"}% returns spaced%20name |
In
TWikiAlphaRelease and TWiki.org.
--
PeterThoeny - 17 May 2002
Pardon my ignorance, but where would this be used? Sorry for the late question...
--
StewStryker - 13 Aug 2002
One example of using this would be passing a spaced string to another page as a parameter, e.g.
[[http://twiki.org/cgi-bin/view/Sandbox/RichardsPage?foo=hi%20there test link with parameter 'foo']] would generate
test link with parameter 'foo'
. This could be used to drive a
CGI program, or if it's a TWiki page you could use %URLPARAM to embed the parameter wherever needed (which is what I've done in this example. Since the parameter could (probably) come from a form or a variable, this is quite flexible.
This would also be useful in passing in a subject line for a mailto: link when using
EmailThisPageLink.
Peter probably has a more real-world example!
--
RichardDonkin - 17 Aug 2002