Is there global that I can use that take the Description and clean it form all html code. I mean if in the Description there are <br><BR> <href></a> <b><u> and more it will not display this code or it change this to < and >.
Apr 20, 2009, 6:22 AM
Veteran / Moderator (17297 posts)
Apr 20, 2009, 6:22 AM
Post #2 of 8
Views: 593
Try something like this:
http://www.gossamer-threads.com/...%3F_P305257/#p305257
Cheers
Andy (mod)
andy@ultranerds.co.uk
IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
http://www.gossamer-threads.com/...%3F_P305257/#p305257
Cheers
Andy (mod)
andy@ultranerds.co.uk
IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
Apr 20, 2009, 7:16 AM
Veteran / Moderator (17297 posts)
Apr 20, 2009, 7:16 AM
Post #5 of 8
Views: 585
Try this global:
use HTML::Parse;
use HTML::FormatText;
my $plain_text = HTML::FormatText->new->format(parse_html($_[0]));
return $plain_text;
}
This will require you to have the modules HTML::Parse and HTML::FormatText installed (if they are not, your host should be able to do it easily for you)
Cheers
Andy (mod)
andy@ultranerds.co.uk
IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
Code:
sub { use HTML::Parse;
use HTML::FormatText;
my $plain_text = HTML::FormatText->new->format(parse_html($_[0]));
return $plain_text;
}
This will require you to have the modules HTML::Parse and HTML::FormatText installed (if they are not, your host should be able to do it easily for you)
Cheers
Andy (mod)
andy@ultranerds.co.uk
IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
Apr 20, 2009, 8:36 AM
Veteran / Moderator (17297 posts)
Apr 20, 2009, 8:36 AM
Post #7 of 8
Views: 576
Sorry, forgot to add:
..after:
...not sure if you added that in? (otherwise it shouldn't have worked =))
If those <p>< tags are still being a problem, just try adding this...
$plain_text =~ s/\Q<\/p>//sig;
... after:
Cheers
Andy (mod)
andy@ultranerds.co.uk
IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
Code:
return $plain_text;..after:
Code:
my $plain_text = HTML::FormatText->new->format(parse_html($_[0]));...not sure if you added that in? (otherwise it shouldn't have worked =))
If those <p>< tags are still being a problem, just try adding this...
Code:
$plain_text =~ s/\Q<p>//sig; $plain_text =~ s/\Q<\/p>//sig;
... after:
Code:
my $plain_text = HTML::FormatText->new->format(parse_html($_[0]));Cheers
Andy (mod)
andy@ultranerds.co.uk
IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates

