For more information... RTFM!
NAVIGATION
PAGES THAT LINK HERE
ACCOUNT LOGIN

You are not logged in

Powered by Interchange version 5.7.0

urlencode

Hex-encodes all non-word characters, except colons.

Also see the urldecode and decode_entities filters.

Example

[filter urlencode]Kevin Walsh[/filter]

Results in:

Kevin%20Walsh

Source code

sub {
    my $val = shift;

    $val =~ s|([^\w:])|sprintf "%%%02x", ord $1|eg;
    return $val;
}

Category:  Filters
Last modified by: Kevin Walsh
Modification date: Monday 26 February 2007 at 12:06 PM (EST)
Home  |  Legal nonsense  |  Privacy policy  |  Donations  |  Contact us