I am confused by this thread. What do you do to get \n to be substituted to a <BR> tag?
I am trying to do it in admin.cgi under the sub add record so that when I add an article, the newlines are preserved when adding it from admin.
I have tried
$in->{Description} =~ s/\n/<BR>/g;
in
sub add_record {
# --------------------------------------------------------
# Adds a record to the database.
#
my ($in, $db) = @_;
# Fix up the category name.
($in->param('CategoryID') !~ /^\d+$/) and $in->param(-name => 'CategoryID', -value => &get_category_id($in->param('CategoryID')));
$in->{Article} =~ s/\n/<BR>/g;
my $id = $db->add_record (&cgi_to_hash($in), $in);
$id ? &html_add_success ($in, $db, $id) : &html_add_failure ($in, $db, $Links: BSQL::error);
}
Of course I get software error.
Thanks, Kevin
I am trying to do it in admin.cgi under the sub add record so that when I add an article, the newlines are preserved when adding it from admin.
I have tried
$in->{Description} =~ s/\n/<BR>/g;
in
sub add_record {
# --------------------------------------------------------
# Adds a record to the database.
#
my ($in, $db) = @_;
# Fix up the category name.
($in->param('CategoryID') !~ /^\d+$/) and $in->param(-name => 'CategoryID', -value => &get_category_id($in->param('CategoryID')));
$in->{Article} =~ s/\n/<BR>/g;
my $id = $db->add_record (&cgi_to_hash($in), $in);
$id ? &html_add_success ($in, $db, $id) : &html_add_failure ($in, $db, $Links: BSQL::error);
}
Of course I get software error.
Thanks, Kevin