Fixed a couple bugs with the new USS.

This commit is contained in:
JT Smith 2002-05-27 22:32:52 +00:00
parent 02f368ff96
commit f348a86ee9
3 changed files with 13 additions and 5 deletions

View file

@ -85,11 +85,12 @@ sub cleanSegment {
=cut
sub filter {
my ($filter, $html);
if ($_[1] eq "all") {
my ($filter, $html, $type);
$type = $_[1] || $session{setting}{filterContributedHTML};
if ($type eq "all") {
$filter = HTML::TagFilter->new(allow=>{'none'},strip_comments=>1);
$html = $filter->filter($_[0]);
} elsif ($_[1] eq "none") {
} elsif ($type eq "none") {
$html = $_[0];
} else {
$filter = HTML::TagFilter->new; # defaultly strips almost everything