.\" This man page is automatically generated using .\" kayadoc2man from the Kaya development tools and the -xmldocs compile .\" option. Editing it directly is not encouraged. .\" It is under the same license as the source .k file that it was .\" generated from. .TH "WebCommon.urlEncode" "3kaya" "August 2014" "Kaya" "Kaya module reference" .SH "NAME" WebCommon::urlEncode \- URL encode a string .SH "SYNOPSIS" .B String urlEncode( \fIString x\fP .B ")" .SH "ARGUMENTS" .PP .B "x" The string to encode .SH "DESCRIPTION" .PP URL encode a string. You should use this to encode reserved characters in URLs that you wish to be passed literally. .IP "" -4 // trying to pass "http://www.example.com" as a parameter url = "http://localhost/test.cgi?url="; url += urlEncode("http://www.example.com"); // url = http://localhost/test.cgi?url=http%3A%2F%2Fwww.example.com .PP Note that in the example above, encoding the whole URL would be incorrect - that would create a relative URL beginning "http://". .SH "AUTHORS" Kaya standard library by Edwin Brady, Chris Morris and others (kaya@kayalang.org). For further information see http://kayalang.org/ .SH LICENSE The Kaya standard library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License (version 2.1 or any later version) as published by the Free Software Foundation. .SH "RELATED" .PD 0 .PP .B "WebCommon.urlDecode"(3kaya) .PD 0.4v