Hi,
It's not Links SQL, it's HTML! HTML, or any browser such as Internet Explorer ignores line breaks. So if you have line breaks in your data and display that in HTML, your browser is going to ignore it.
What you want, is to convert line breaks to <BR> tags which your browser will display as breaks. You need a bit of code to do this. Lets say your field name is 'Review' that has a couple paragraphs in plain text that you want to convert to HTML for display. If you add to globals the tag:
Review_Formatted =>
my $tags = shift;
my $review = $tags->{Review};
$review =~ s/\n/<BR>\n/g;
$review = GT::CGI::html_escape($review);
return $review;
}
and then use <%Review_Formatted%> on your template, it will show up nice and formatted. =)
Cheers,
Alex
--
Gossamer Threads Inc.
It's not Links SQL, it's HTML! HTML, or any browser such as Internet Explorer ignores line breaks. So if you have line breaks in your data and display that in HTML, your browser is going to ignore it.
What you want, is to convert line breaks to <BR> tags which your browser will display as breaks. You need a bit of code to do this. Lets say your field name is 'Review' that has a couple paragraphs in plain text that you want to convert to HTML for display. If you add to globals the tag:
Review_Formatted =>
Code:
sub { my $tags = shift;
my $review = $tags->{Review};
$review =~ s/\n/<BR>\n/g;
$review = GT::CGI::html_escape($review);
return $review;
}
and then use <%Review_Formatted%> on your template, it will show up nice and formatted. =)
Cheers,
Alex
--
Gossamer Threads Inc.