amearse has asked for the wisdom of the Perl Monks concerning the following question:
I have two CGI's. One that stores form input in a MySQL database. The other an Admin page to view the user input in nicely formated tables. One of the input fields is really large for posting spam with complete headers. The problem is that the spam is sometimes html-laden which makes it very ugly when it is viewed through the admin CGI.
Is there a way to view the spam in plain-text form via the CGI? Or do I have to strip out the html first?
Here is the code that displays the content.
sub full_report { my $row = shift; print "<HR>", strong("Full Report"); print "<TABLE BORDER=1>"; my $edit_url = sprintf ("%s?choice=edit;id=%d", url(), + $row->{id}); my $delete_url = sprintf ("%s?choice=delete;id=%d", ur +l(), $row->{id}); my $full_report_url = sprintf ("%s?choice=full_report; +id=%d", url(), $row->{id}); print "<TR>", "<TD>$row->{id}</TD>", "<TD>$row->{date}</TD>", "<TD>$row->{summary}</TD>", "<TD>$row->{type}</TD>", "<TD>", "[", a({-href => $delete_url}, + "Delete"), "]", "[", a({-href => $edit_url}, " +Edit"), "]", "[", a({-href => $full_report_ +url}, "Full Report"), "]", "</TD>", "<TR><TD COLSPAN=6>$row->{mess +age}</TD></TR>", "</TR></TABLE>"; }
Edit kudra, 2002-06-06 Changed title, added p
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Content-Type: text/html;
by Hero Zzyzzx (Curate) on Jun 04, 2002 at 02:22 UTC | |
|
Re: Content-Type: text/html;
by DamnDirtyApe (Curate) on Jun 04, 2002 at 02:41 UTC | |
|
Re: Content-Type: text/html;
by Aristotle (Chancellor) on Jun 04, 2002 at 11:44 UTC | |
|
Re: Content-Type: text/html;
by Hero Zzyzzx (Curate) on Jun 04, 2002 at 15:22 UTC | |
|
Re: Content-Type: text/html;
by George_Sherston (Vicar) on Jun 04, 2002 at 16:42 UTC |