Reference: uri_escape
Author: Ellen Siever, Stephen Spainhour & Nathan Patwardhan
Date: 1999-07-02T01:58:29Z

#

| Chapter 17 The LWP Library |

## uri_escape

    uri_escape uri, [regexp]

Given a URI as the first parameter, returns the equivalent URI with certain characters replaced with % followed by two hexadecimal digits. The first parameter can be a text string, like "http://www.oreilly.com", or an object of type URI::URL. When invoked without a second parameter, `uri_escape` escapes characters specified by RFC 1738. Otherwise, you can pass in a regular expression (in the context of `[ ]`) of characters to escape as the second parameter. For example:

>     $escaped_uri = uri_escape($uri, 'aeiou')

This code escapes all lowercase vowels in `$uri` and returns the escaped version.

17.5 The URI Module |  | Reference: uri_unescape