Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

(Ovid encoding URLs)Re: URL Escaping

by Ovid (Cardinal)
on Dec 28, 2000 at 03:47 UTC ( [id://48555]=note: print w/replies, xml ) Need Help??


in reply to URL Escaping

The function uri_escape takes an optional second argument that's a list of all characters that you want to encode. The following should work for you:
#!/usr/bin/perl -w use strict; use URI::Escape; my $cgi_chars = '\x00-\x29\x2b\x2c\x2f\x3a-\x40\x5b-\x5e\x60\x7b-\xff +'; my $bad_chars = '^%$&='; print uri_escape( $bad_chars, $cgi_chars );

Cheers,
Ovid

Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://48555]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (6)
As of 2024-04-18 17:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found