Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

Re: BR tags in admin submissions

Quote Reply
Re: BR tags in admin submissions In reply to
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 =>
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.
Subject Author Views Date
Thread; hot thread BR tags in admin submissions kuplo 15216 Aug 2, 2001, 4:10 PM
Post; hot thread Re: BR tags in admin submissions
Stealth 14544 Aug 2, 2001, 5:09 PM
Post; hot thread Re: BR tags in admin submissions
Eraser 14513 Aug 3, 2001, 7:47 AM
Thread; hot thread Re: BR tags in admin submissions
account deleted 14595 Aug 3, 2001, 10:15 AM
Thread; hot thread Re: BR tags in admin submissions
Evoir 14640 Sep 6, 2001, 5:18 PM
Thread; hot thread Re: BR tags in admin submissions
Alex 14500 Sep 6, 2001, 6:22 PM
Thread; hot thread Re: BR tags in admin submissions
Evoir 14669 Sep 7, 2001, 10:46 AM
Thread; hot thread Re: BR tags in admin submissions
Paul 14448 Sep 7, 2001, 11:15 AM
Thread; hot thread Re: BR tags in admin submissions
Evoir 14448 Sep 7, 2001, 11:39 AM
Thread; hot thread Re: BR tags in admin submissions
Alex 15024 Sep 7, 2001, 11:59 AM
Post; hot thread Re: BR tags in admin submissions
Evoir 14445 Sep 7, 2001, 12:03 PM
Thread; hot thread Re: BR tags in admin submissions
Evoir 14426 Sep 9, 2001, 1:20 AM
Thread; hot thread Re: BR tags in admin submissions
Paul 14379 Sep 9, 2001, 4:42 AM
Thread; hot thread Re: BR tags in admin submissions
Evoir 14516 Sep 9, 2001, 11:28 AM
Thread; hot thread Re: BR tags in admin submissions
Paul 14436 Sep 9, 2001, 11:38 AM
Thread; hot thread Re: BR tags in admin submissions
Paul 14490 Sep 9, 2001, 11:39 AM
Thread; hot thread Re: BR tags in admin submissions
Evoir 14440 Sep 9, 2001, 12:10 PM
Thread; hot thread Re: BR tags in admin submissions
Paul 14557 Sep 9, 2001, 12:44 PM
Thread; hot thread Re: BR tags in admin submissions
Evoir 14453 Sep 9, 2001, 12:54 PM
Thread; hot thread Re: BR tags in admin submissions
Paul 14466 Sep 9, 2001, 1:03 PM
Thread; hot thread Re: [PaulW] BR tags in admin submissions
Evoir 14284 Dec 13, 2001, 6:57 PM
Thread; hot thread Re: [Evoir] BR tags in admin submissions
Alex 12087 Dec 13, 2001, 7:25 PM
Thread; hot thread Re: [Alex] BR tags in admin submissions
Evoir 12104 Dec 13, 2001, 7:51 PM
Thread; hot thread Re: [Evoir] BR tags in admin submissions
Paul 11968 Dec 14, 2001, 3:37 AM
Thread; hot thread Re: [PaulW] BR tags in admin submissions
Alex 12519 Dec 14, 2001, 10:04 AM
Thread; hot thread Re: [Alex] BR tags in admin submissions
Paul 12115 Dec 14, 2001, 10:13 AM
Thread; hot thread Re: [PaulW] BR tags in admin submissions
Evoir 12061 Dec 15, 2001, 7:00 PM
Post; hot thread Re: [Evoir] BR tags in admin submissions
Robert 12100 Feb 12, 2002, 12:38 AM
Thread; hot thread Re: [Paul] BR tags in admin submissions
Evoir 11953 Mar 27, 2002, 6:13 PM
Thread; hot thread Re: [Evoir] BR tags in admin submissions
Paul 11983 Mar 28, 2002, 2:12 AM
Post; hot thread Re: [Paul] BR tags in admin submissions
Evoir 11818 Jul 18, 2002, 10:35 PM
Thread; hot thread Re: [Paul] BR tags in admin submissions
Robo 11858 Jul 31, 2002, 4:03 AM
Thread; hot thread Re: [Robo] BR tags in admin submissions
Paul 11866 Jul 31, 2002, 4:09 AM
Thread; hot thread Re: [Paul] BR tags in admin submissions
Robo 11841 Jul 31, 2002, 5:23 AM
Thread; hot thread Re: [Robo] BR tags in admin submissions
Paul 11874 Jul 31, 2002, 6:39 AM
Post; hot thread Re: [Paul] BR tags in admin submissions
Robo 11676 Jul 31, 2002, 7:23 AM
Thread; hot thread Re: [Paul] BR tags in admin submissions
Evoir 11723 Aug 28, 2002, 9:04 AM
Thread; hot thread Re: [Evoir] BR tags in admin submissions
Paul 11691 Aug 28, 2002, 9:11 AM
Thread; hot thread Re: [Paul] BR tags in admin submissions
Evoir 11667 Aug 28, 2002, 9:22 AM
Thread; hot thread Re: [Evoir] BR tags in admin submissions
Paul 11680 Aug 28, 2002, 9:31 AM
Thread; hot thread Re: [Paul] BR tags in admin submissions
Evoir 11718 Aug 28, 2002, 9:37 AM
Thread; hot thread Re: [Evoir] BR tags in admin submissions
Paul 11726 Aug 28, 2002, 9:38 AM
Thread; hot thread Re: [Paul] BR tags in admin submissions
Evoir 11698 Aug 28, 2002, 9:44 AM
Thread; hot thread Re: [Evoir] BR tags in admin submissions
Paul 11716 Aug 28, 2002, 9:51 AM
Thread; hot thread Re: [Paul] BR tags in admin submissions
ryel01 12193 Aug 28, 2002, 2:45 PM
Post; hot thread Re: [ryel01] BR tags in admin submissions
webmaster33 12058 Aug 28, 2002, 3:51 PM
Thread; hot thread Re: [ryel01] BR tags in admin submissions
Paul 12153 Aug 29, 2002, 2:30 AM
Thread; hot thread Re: [Paul] BR tags in admin submissions
charly 12174 Sep 15, 2002, 3:52 AM
Thread; hot thread Re: [charly] BR tags in admin submissions
Evoir 12146 Sep 15, 2002, 10:14 AM
Thread; hot thread Re: [Evoir] BR tags in admin submissions
yogi 12156 Sep 15, 2002, 10:18 AM
Post; hot thread Re: [yogi] BR tags in admin submissions
Evoir 12035 Sep 15, 2002, 10:29 AM
Thread; hot thread Re: [Evoir] BR tags in admin submissions
charly 12118 Sep 15, 2002, 1:03 PM
Thread; hot thread Re: [charly] BR tags in admin submissions
Evoir 12082 Sep 15, 2002, 4:34 PM
Post; hot thread Re: [Evoir] BR tags in admin submissions
charly 11947 Sep 22, 2002, 5:40 AM
Post; hot thread Re: [Alex] BR tags in admin submissions
Evoir 11756 Jul 27, 2002, 5:28 PM
Post; hot thread Re: [Paul] BR tags in admin submissions
charly 11758 Jun 12, 2002, 10:41 AM
Thread; hot thread Re: BR tags in admin submissions
Paul 14416 Sep 9, 2001, 11:41 AM
Thread; hot thread Re: BR tags in admin submissions
Evoir 14767 Sep 9, 2001, 12:24 PM
Thread; hot thread Re: BR tags in admin submissions
Paul 14344 Sep 9, 2001, 12:31 PM
Post; hot thread Re: BR tags in admin submissions
Evoir 14312 Sep 9, 2001, 12:50 PM
Thread; hot thread Re: [Alex] BR tags in admin submissions
cfox 11943 Mar 6, 2003, 10:04 PM
Thread; hot thread Re: [cfox] BR tags in admin submissions
klauslovgreen 11959 Mar 6, 2003, 11:17 PM
Post; hot thread Re: [klauslovgreen] BR tags in admin submissions
klauslovgreen 11862 Mar 7, 2003, 12:21 AM
Thread; hot thread Re: [kuplo] BR tags in admin submissions
long327 11767 Apr 2, 2004, 2:45 PM
Thread; hot thread Re: [long327] BR tags in admin submissions
Matthias70 11473 Oct 31, 2007, 2:16 PM
Thread; hot thread Re: [Matthias70] BR tags in admin submissions
Andy 11411 Nov 1, 2007, 2:44 AM
Thread; hot thread Re: [Andy] BR tags in admin submissions
Matthias70 11475 Nov 1, 2007, 4:50 AM
Thread; hot thread Re: [Matthias70] BR tags in admin submissions
Andy 11506 Nov 1, 2007, 5:02 AM
Thread; hot thread Re: [Andy] BR tags in admin submissions
Matthias70 11377 Nov 1, 2007, 5:12 AM
Thread; hot thread Re: [Matthias70] BR tags in admin submissions
Andy 11940 Nov 1, 2007, 5:15 AM
Thread; hot thread Re: [Andy] BR tags in admin submissions
Matthias70 11431 Nov 1, 2007, 5:21 AM
Thread; hot thread Re: [Matthias70] BR tags in admin submissions
Andy 11770 Nov 1, 2007, 5:26 AM
Thread; hot thread Re: [Andy] BR tags in admin submissions
Matthias70 11425 Nov 1, 2007, 5:29 AM
Thread; hot thread Re: [Matthias70] BR tags in admin submissions
Andy 11540 Nov 1, 2007, 5:32 AM
Post; hot thread Re: [Andy] BR tags in admin submissions
Andy 11405 Nov 1, 2007, 5:42 AM
Thread; hot thread Re: [Andy] BR tags in admin submissions
Matthias70 4037 Nov 1, 2007, 5:42 AM
Thread; hot thread Re: [Matthias70] BR tags in admin submissions
Andy 4020 Nov 1, 2007, 5:52 AM
Thread; hot thread Re: [Andy] BR tags in admin submissions
Matthias70 4088 Nov 1, 2007, 6:03 AM
Thread; hot thread Re: [Matthias70] BR tags in admin submissions
Andy 4023 Nov 1, 2007, 6:22 AM
Post; hot thread Re: [Andy] BR tags in admin submissions
Matthias70 3983 Nov 1, 2007, 6:44 AM