aakashmgupta has asked for the wisdom of the Perl Monks concerning the following question:
my $cgi = CGI->new(); use HTML::Entities; sub escapeParams { my( $self ) = shift; my @params = $self->query->param('<>&"'); foreach my $param ( @params ) { # $self->query->param( $param, HTML::Entities::encode( +$self->query->param( $param ) ) ); $self->query->param( HTML::Entities::encode($param), HTML: +:Entities::encode( $self->query->param( $param ) ) ); print $self->query->param( $param ); } } escapeParams($cgi);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: HTML::ENTITIES for URL encoding
by cheako (Beadle) on Mar 04, 2015 at 20:44 UTC | |
by aakashmgupta (Initiate) on Mar 05, 2015 at 03:34 UTC | |
by cheako (Beadle) on Mar 05, 2015 at 04:00 UTC | |
by cheako (Beadle) on Mar 05, 2015 at 04:02 UTC | |
|
Re: HTML::ENTITIES for URL encoding
by Anonymous Monk on Mar 05, 2015 at 13:41 UTC |