1WebCommon.urlEncode(3kaya)   Kaya module reference  WebCommon.urlEncode(3kaya)
2
3
4

NAME

6       WebCommon::urlEncode - URL encode a string
7

SYNOPSIS

9       String urlEncode( String x )
10

ARGUMENTS

12       x The string to encode
13

DESCRIPTION

15       URL  encode a string. You should use this to encode reserved characters
16       in URLs that you wish to be passed literally.
17
18
19    // trying to pass "http://www.example.com" as a parameter
20    url = "http://localhost/test.cgi?url=";
21    url += urlEncode("http://www.example.com");
22    // url = http://localhost/test.cgi?url=http%3A%2F%2Fwww.example.com
23
24       Note that in the example above, encoding the whole URL would be  incor‐
25       rect - that would create a relative URL beginning "http://".
26

AUTHORS

28       Kaya   standard  library  by  Edwin  Brady,  Chris  Morris  and  others
29       (kaya@kayalang.org). For further information see http://kayalang.org/
30

LICENSE

32       The Kaya standard library is free software;  you  can  redistribute  it
33       and/or  modify  it  under  the  terms  of the GNU Lesser General Public
34       License (version 2.1 or any later version) as  published  by  the  Free
35       Software Foundation.
36
38       WebCommon.urlDecode (3kaya)
39
40
41
42Kaya                             December 2010      WebCommon.urlEncode(3kaya)
Impressum