Gossamer Forum
Home : General : Perl Programming :

Line feeds/<BR>in DBMan SQL

Quote Reply
Line feeds/<BR>in DBMan SQL
Hi all,
I do know that this kind of question has been thrashed about in the Links SQL dev, plug-in and global forum some-time back.. but since it hasn't solved my issue and because Paul seems to be giving a lot of very useful answers in this forum, here goes:

I have a field name <%Content%>. Importing data into my db, it gets filled with lots of plain text - not HTML! This plain text contains invisible line feeds (hex 0B) and displays properly with paragraphs in all my editors.

I have a global name Content_Formatted :

sub {
my $tags = shift;
my $content = $tags->{Content};
$content = GT::CGI::html_escape ($content);
$content =~ s/\n/<BR>\n/g;
return $content;
}

In my template, I display <%Content_Formatted%> instead of <%Content%>. Now I should get all my plain texts displaying properly, ie line feeds converted to <BR>. That's what people have been saying. But no. Yet the global works because (?) if I insert a new line online modifying manually a record, the new line does display...

So something I've done is wrong or not working! I'd really appreciate some well-explained-for-layman-type-wisdom !
Thanks in advance
Charly
Subject Author Views Date
Thread Line feeds/<BR>in DBMan SQL charly 5125 Jun 15, 2002, 2:18 PM
Thread Re: [charly] Line feeds/<BR>in DBMan SQL
VanSchongluer 4960 Jun 15, 2002, 3:23 PM
Post Re: [VanSchongluer] Line feeds/<BR>in DBMan SQL
charly 4928 Jun 15, 2002, 11:56 PM
Thread Re: [charly] Line feeds/<BR>in DBMan SQL
Paul 4940 Jun 16, 2002, 2:13 AM
Thread Re: [Paul] Line feeds/<BR>in DBMan SQL
charly 4946 Jun 16, 2002, 9:47 AM
Thread Re: [charly] Line feeds/<BR>in DBMan SQL
charly 4935 Jun 16, 2002, 10:21 AM
Post Re: [charly] Line feeds/<BR>in DBMan SQL
Paul 4935 Jun 16, 2002, 11:19 AM
Post Post deleted by Paul
Paul 4932 Jun 16, 2002, 11:20 AM