in reply to CGI param cleansing
And on the output, escapeHTML should take care of any hand generated items, and the HTML generation subroutines should take care of the rest.
What exactly is it that you think you need to "clean"?
As an example, suppose I have a filename in $dangerous that could contain any possible character in the Unix pathname, and I want to both show its name, and generate a link to it. All I have to do is this:
No extra code required.use CGI qw(a escapeHTML); # amongst other things ... print a({-href => $dangerous}, escapeHTML($dangerous));
-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: CGI param cleansing
by ambrus (Abbot) on Jun 02, 2006 at 19:50 UTC | |
|
Re^2: CGI param cleansing
by ruzam (Curate) on Jun 02, 2006 at 20:10 UTC |