Gossamer Forum
Home : Products : Gossamer Links : Discussions :

turning carriage returns in HTML br tags?

Quote Reply
turning carriage returns in HTML br tags?
Hi,

1. I somehow remember that there is a setting where I can get Glinks to convert carriage returns into <br> tags in the description field ... can anyone point out where that is?

2. How much HTML does Glinks allow to get through in the Links description field?

Thanks again,

K
Quote Reply
Re: [kajukenbokid] turning carriage returns in HTML br tags? In reply to
1. You will need a global, name it addbr and call it with <%addbr($Description)%> in your templates:

Code:
sub {
my $field = $_[0];
$field =~ s/\n/\<br\/\>/gi;
return $field;
}
2. The limit on a LONGTEXT field is 4,294,967,295 characters - that should be more than enough for you Wink.
Quote Reply
Re: [aus_dave] turning carriage returns in HTML br tags? In reply to
Thanks a bunch.

Not only did you solve that issue, you quickly showed my how to use globals.

Best documentation in all of GLinks.

Wink