Re: URI::Escape

Randal L. Schwartz (merlyn@stonehenge.com)
20 Jul 1999 08:47:36 -0700


>>>>> "Kevin" == Kevin Stephens <ksteph@suburbialost.com> writes:

Kevin> 	I am writing in hopes someone can explain to me why URI::Escape
Kevin> doesn't escape the apersand? I assume that it does not escape it, so if
Kevin> you hand it an already formed URI, you can escape it with out messing up
Kevin> the apersands used for seperation: name1=value1&name2=value2. 
Kevin> 	However, I am trying to find a way to escape the apersand within
Kevin> the value: 
Kevin> print "$name1=", uri_escape($value1), "&name2",
Kevin>       uri_escape($value2);

uri_escape doesn't escape the ampersand because it's not a special
character to a URI.  What are you doing?

Maybe you want the URI->new constructor instead, especially
with the ->query_form method.

-- 
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@teleport.com)
Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me