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

Shortened Versions Global

Quote Reply
Shortened Versions Global
Hi,

Is there some code to add to this Shortened Versions Columns global (found in the resource section) that will remove any occurrences of the following:

" ' < >


sub {
my $tags = shift;
my $desc = $tags->{Description} or return "Non on this template";
length $desc <100 and return $desc;
my $short = substr ($desc, 0, 100);
$short =~ s/\s\S+?$//;
$short .= " ...";
return $short;
}


This way you could add the outputted text into a meta tag without html tags breaking the meta tag.

--------------------------------
Privacy Software
Subject Author Views Date
Thread; hot thread Shortened Versions Global BLOOD 10422 Feb 10, 2003, 7:02 AM
Thread; hot thread Re: [BLOOD] Shortened Versions Global
Paul 10226 Feb 10, 2003, 7:35 AM
Thread; hot thread Re: [Paul] Shortened Versions Global
BLOOD 10236 Feb 10, 2003, 8:03 AM
Thread; hot thread Re: [BLOOD] Shortened Versions Global
Paul 10255 Feb 10, 2003, 8:06 AM
Thread; hot thread Re: [Paul] Shortened Versions Global
BLOOD 10168 Feb 10, 2003, 8:13 AM
Thread; hot thread Re: [BLOOD] Shortened Versions Global
Andy 10220 Feb 10, 2003, 8:28 AM
Thread; hot thread Re: [Andy] Shortened Versions Global
BLOOD 10184 Feb 10, 2003, 8:31 AM
Thread; hot thread Re: [BLOOD] Shortened Versions Global
Andy 10219 Feb 10, 2003, 8:35 AM
Thread; hot thread Re: [Andy] Shortened Versions Global
BLOOD 10196 Feb 10, 2003, 8:42 AM
Thread; hot thread Re: [BLOOD] Shortened Versions Global
Paul 10250 Feb 10, 2003, 8:44 AM
Post; hot thread Re: [Paul] Shortened Versions Global
BLOOD 10130 Feb 10, 2003, 8:51 AM
Thread; hot thread Re: [Paul] Shortened Versions Global
BLOOD 10172 Feb 10, 2003, 9:23 AM
Thread; hot thread Re: [BLOOD] Shortened Versions Global
Paul 10183 Feb 10, 2003, 9:38 AM
Post; hot thread Re: [Paul] Shortened Versions Global
BLOOD 10205 Feb 10, 2003, 9:40 AM
Thread; hot thread Re: [Paul] Shortened Versions Global
BLOOD 10186 Feb 15, 2003, 12:42 PM
Thread; hot thread Re: [BLOOD] Shortened Versions Global
BLOOD 10108 Feb 16, 2003, 7:06 AM
Thread; hot thread Re: [BLOOD] Shortened Versions Global
Paul 10097 Feb 16, 2003, 7:30 AM
Thread; hot thread Re: [Paul] Shortened Versions Global
BLOOD 10103 Feb 16, 2003, 7:49 AM
Thread; hot thread Re: [BLOOD] Shortened Versions Global
Paul 10098 Feb 16, 2003, 9:06 AM
Post; hot thread Re: [Paul] Shortened Versions Global
Andy 10107 Feb 17, 2003, 2:25 AM
Post; hot thread Re: [BLOOD] Shortened Versions Global
Paul 10214 Feb 10, 2003, 8:36 AM