---
name: "ns_urlencode"
section: "3"
platform: "linux"
package: "aolserver4"
version: "4.0.10-7"
release: "Debian 4.0 (Etch)"
platforms: ["linux"]
url: "https://new.carta.tech/ns_urlencode"
---

# ns\_urlencode(3)

commands

```

```

## NAME

ns\_urlencode - commands

## SYNOPSIS

**ns\_urlencode** *data*

```

```

## DESCRIPTION

*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\>"*

## SEE ALSO

*ns\_urldecode(n)*

## KEYWORDS
