budman has asked for the wisdom of the Perl Monks concerning the following question:
Everything works smoothly, until the log content contains a greater-than sign, single quote, or double quote.
First off, I read the log contents into a list @LogData.
On the display page, I open the <TEXTAREA> and then print the log contents into the area. Sometimes, this breaks the <TEXTAREA> causing to be displayed adhoc. I think this is due to the greater-than sign cause the browser to think the textarea was closed.
Second, on the email page, when the LogContents is forwarded to the page via the HIDDEN INPUT variable, if the data contains greater-than sign it also causes a problem with the logdata.
I pass the data as: print "<INPUT TYPE=HIDDEN NAME=LOGDATA VALUE=\"@LogData\">";
Should the data in @LogData be encoded first?
Should the greater-than signs in the log content be changed to HTML equivalents?
I print the Log Data in the TextArea using:
print "$line\r\n";
How do you stop the contents of $line from being interperted?
Thanks for your help.
budman
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Passing Data using CGI
by Juerd (Abbot) on Jan 04, 2002 at 15:31 UTC | |
by Anonymous Monk on Jan 05, 2002 at 12:50 UTC | |
|
Re: Passing Data using CGI
by hakkr (Chaplain) on Jan 04, 2002 at 17:32 UTC | |
by budman (Sexton) on Jan 05, 2002 at 01:05 UTC |