Gossamer Forum
Home : Products : Links 2.0 : Discussions :

Edit Templates - Extra Spaced

Quote Reply
Edit Templates - Extra Spaced
When I "Edit Templates" in version 2.0 it adds extra carriage returns? How do I fix this?

Mel
Quote Reply
Re: Edit Templates - Extra Spaced In reply to
I too have this problem on 2 separate installs. Everything works fine until you edit a template and save it online. If I go look at the newly saved file, sure enough, there are extra carriage returns all over the place.

Please tell me there is a fix for this.
Quote Reply
Re: Edit Templates - Extra Spaced In reply to
Hmmmm.. nobody seems to know about this.
I'm using the Yahoo template, but I don't think that should matter. Soon as I edit any file online, it adds those darn carriage returns grrr..
Quote Reply
Re: Edit Templates - Extra Spaced In reply to
I've seen this on some NT systems and am sure it's a problem with Line feeds between systems. If you look in db.pl in sub save_template, try adding in right after:

my $tpl = $in{'tpl'};

add this:

$tpl =~ s/\r//g;

or try this:

$tpl =~ s/\n\n/\n/g;

which could mess things up if you are using <pre> tags or something. Let me know how it works for you..

Cheers,

Alex
Quote Reply
Re: Edit Templates - Extra Spaced In reply to
Wehoo!
$tpl =~ s/\r//g;
did the trick !!

Thanks Alex.