I designing a small Perl-based webapp with a MySQL backend. There is a script that pulls values from the DB and populates form fields. Some of the fields must have freeform text (can have <>'" etc.). Getting it into the DB isn't a problem. Populating the form fields with this type of data is, though. I have a test data field that is "you don't want to know". I have tried making it safe with:

$string =~ s/\'/\\'/g;
$string = $cgi->escape($string); // using CGI.pm

Neither approach works properly. How does everyone else deal with this?

--
Andrew Gaffney
Network Administrator
Skyline Aeronautics, LLC.
636-357-1548


-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to