working on new discussion system

This commit is contained in:
JT Smith 2003-07-13 03:28:03 +00:00
parent b84c79ab96
commit a4d391b52a
6 changed files with 81 additions and 52 deletions

View file

@ -32,7 +32,6 @@ A package for manipulating and massaging HTML.
use WebGUI::HTML;
$html = WebGUI::HTML::cleanSegment($html);
$html = WebGUI::HTML::filter($html);
$html = WebGUI::HTML::searchAndReplace($html);
=head1 METHODS
@ -128,32 +127,6 @@ sub filter {
}
}
#-------------------------------------------------------------------
=head2 searchAndReplace ( html )
Replaces all occurrences of strings specified in the config file.
=over
=item html
The HTML segment you want to have search and replaced.
=back
=cut
sub searchAndReplace {
my $content = shift;
foreach my $search (keys %{$session{config}{searchAndReplace}}) {
my $replace = $session{config}{searchAndReplace}{$search};
$content =~ s/\Q$search/$replace/g;
}
return $content;
}
1;