Newbie - Escaping special chars in forms 
Author Message
 Newbie - Escaping special chars in forms

Hi,

In ASP I use server.urlEncode to encode special characters.

Does anyone know a similar function in Perl? I'm creating a form on the
fly and submitting it to another page. Problems are arising when there
are "&" characters in the form.

So, if there is a function then that would be great. If there is no
function, then can someone please tell me which characters besides "&"
need to be replaced to get the form to submit properly?

Thanks,
scottfreez

Sent via Deja.com http://www.*-*-*.com/
Before you buy.



Mon, 10 Feb 2003 08:32:51 GMT  
 Newbie - Escaping special chars in forms
hi,

Quote:

> In ASP I use server.urlEncode to encode special characters.
> Does anyone know a similar function in Perl? I'm creating a form on the
> fly and submitting it to another page. Problems are arising when there
> are "&" characters in the form.

use
$value = CGI::escape($value);

(not documented)

tina

--
http://tinita.de    \  enter__| |__the___ _ _ ___
tina's moviedatabase \     / _` / _ \/ _ \ '_(_-< of
search & add comments \    \__,_\___/\___/_| /__/ perception
please don't email unless offtopic or followup is set. thanx



Mon, 10 Feb 2003 09:43:57 GMT  
 Newbie - Escaping special chars in forms
Thanks!!


Quote:

> hi,

> > In ASP I use server.urlEncode to encode special characters.

> > Does anyone know a similar function in Perl? I'm creating a form on
the
> > fly and submitting it to another page. Problems are arising when
there
> > are "&" characters in the form.

> use
> $value = CGI::escape($value);

> (not documented)

> tina

> --
> http://tinita.de    \  enter__| |__the___ _ _ ___
> tina's moviedatabase \     / _` / _ \/ _ \ '_(_-< of
> search & add comments \    \__,_\___/\___/_| /__/ perception
> please don't email unless offtopic or followup is set. thanx

Sent via Deja.com http://www.deja.com/
Before you buy.


Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Replacing special chars with special chars

2. escape special chars before loading into MySQL

3. is there a way to escape special chars

4. regex to escape special characters

5. Shell special chars in file names?

6. pattern matching with special char

7. interpolate escaped chars in string

8. Adding escape chars to email address

9. Special chars

10. special chars

11. about special chars when split()

12. Text::CSV with Special Chars?

 

 
Powered by phpBB® Forum Software