ns_urlencode(3)

ns_urlencode3

Commands

Usage

ns_urlencode data


    


    


    

Overview

Encodes data according to the encoding defined in RFC #1738, Uniform Resource Locators.

ns_urlencode encodes all non-alphanumeric characters in data. The encoding for a character is a "%" followed by the two-character hexadecimal representation for the character.

urlencoding the string:
http://www.aolserver.com/redirect.adp?url=http://www.aol.com&t=1,2,3 yields the string:
http%3a%2f%2fwww%2eaolserver%2ecom%2fredirect%2eadp%3furl%3dhttp%3a%2f%2fwww%2eaol%2ecom%26t%3d1%2c2%2c3

Examples

ns_urlencode:
set link [ns_urlencode http://www.aolserver.com/redirect.adp?url=http://www.aol.com&t=1,2,3]
ns_adp_puts "<a href=[ns_urlencode $link]>click</a>"

Keywords

Releases

Unchanged in 2 releases since Debian 3.1 (Sarge).

  1. 3.1–4.0

From aolserver4 4.0.10-7 in Debian 4.0 (Etch). Parsed by carta from the page's man source.