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
In reply to Escaping HTML tags (was: Content-Type: text/html;) by amearse
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |